DataGridView Question - VB.NET 2005

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Samuel Shulman

    #1

    DataGridView Question - VB.NET 2005

    Hi

    I am starting to use this powerful controls but I am having a little problem

    When I use ListView Control I could inherit the ListViewItem to add
    additional members typically for the Row ID in the database some times of
    more than 1 record (if the row contains related data from a number of
    tables) then I had all this info attached to each row

    How can I achieve anything like that in the DataGridView control?

    thank you,
    Samuel


  • Brian Tkatch

    #2
    Re: DataGridView Question - VB.NET 2005


    Samuel Shulman wrote:[color=blue]
    > Hi
    >
    > I am starting to use this powerful controls but I am having a little problem
    >
    > When I use ListView Control I could inherit the ListViewItem to add
    > additional members typically for the Row ID in the database some times of
    > more than 1 record (if the row contains related data from a number of
    > tables) then I had all this info attached to each row
    >
    > How can I achieve anything like that in the DataGridView control?
    >
    > thank you,
    > Samuel[/color]

    Assuming the DataGrid has its DataSource as a DataTable's DefaultView,
    you would add another DataColumn to the DataTable and hide it:

    DataSet.Tables( table).Columns( column).ColumnM apping() =
    MappingType.Hid den


    B.

    Comment

    • Samuel Shulman

      #3
      Re: DataGridView Question - VB.NET 2005

      I actually don't bind it

      Samuel


      "Brian Tkatch" <Maxwell_Smart@ ThePentagon.com > wrote in message
      news:1151593790 .964053.160700@ d56g2000cwd.goo glegroups.com.. .[color=blue]
      >
      > Samuel Shulman wrote:[color=green]
      >> Hi
      >>
      >> I am starting to use this powerful controls but I am having a little
      >> problem
      >>
      >> When I use ListView Control I could inherit the ListViewItem to add
      >> additional members typically for the Row ID in the database some times of
      >> more than 1 record (if the row contains related data from a number of
      >> tables) then I had all this info attached to each row
      >>
      >> How can I achieve anything like that in the DataGridView control?
      >>
      >> thank you,
      >> Samuel[/color]
      >
      > Assuming the DataGrid has its DataSource as a DataTable's DefaultView,
      > you would add another DataColumn to the DataTable and hide it:
      >
      > DataSet.Tables( table).Columns( column).ColumnM apping() =
      > MappingType.Hid den
      >
      >
      > B.
      >[/color]


      Comment

      • Brian Tkatch

        #4
        Re: DataGridView Question - VB.NET 2005


        Samuel Shulman wrote:[color=blue]
        > I actually don't bind it
        >
        > Samuel
        >
        >
        > "Brian Tkatch" <Maxwell_Smart@ ThePentagon.com > wrote in message
        > news:1151593790 .964053.160700@ d56g2000cwd.goo glegroups.com.. .[color=green]
        > >
        > > Samuel Shulman wrote:[color=darkred]
        > >> Hi
        > >>
        > >> I am starting to use this powerful controls but I am having a little
        > >> problem
        > >>
        > >> When I use ListView Control I could inherit the ListViewItem to add
        > >> additional members typically for the Row ID in the database some times of
        > >> more than 1 record (if the row contains related data from a number of
        > >> tables) then I had all this info attached to each row
        > >>
        > >> How can I achieve anything like that in the DataGridView control?
        > >>
        > >> thank you,
        > >> Samuel[/color]
        > >
        > > Assuming the DataGrid has its DataSource as a DataTable's DefaultView,
        > > you would add another DataColumn to the DataTable and hide it:
        > >
        > > DataSet.Tables( table).Columns( column).ColumnM apping() =
        > > MappingType.Hid den
        > >
        > >
        > > B.
        > >[/color][/color]

        Setting a DataSource on a Windows Form DataGrid does not require a
        binding.

        B.

        Comment

        • Samuel Shulman

          #5
          Re: DataGridView Question - VB.NET 2005

          I populate it manually

          "Brian Tkatch" <Maxwell_Smart@ ThePentagon.com > wrote in message
          news:1151610694 .610444.92450@b 68g2000cwa.goog legroups.com...[color=blue]
          >
          > Samuel Shulman wrote:[color=green]
          >> I actually don't bind it
          >>
          >> Samuel
          >>
          >>
          >> "Brian Tkatch" <Maxwell_Smart@ ThePentagon.com > wrote in message
          >> news:1151593790 .964053.160700@ d56g2000cwd.goo glegroups.com.. .[color=darkred]
          >> >
          >> > Samuel Shulman wrote:
          >> >> Hi
          >> >>
          >> >> I am starting to use this powerful controls but I am having a little
          >> >> problem
          >> >>
          >> >> When I use ListView Control I could inherit the ListViewItem to add
          >> >> additional members typically for the Row ID in the database some times
          >> >> of
          >> >> more than 1 record (if the row contains related data from a number of
          >> >> tables) then I had all this info attached to each row
          >> >>
          >> >> How can I achieve anything like that in the DataGridView control?
          >> >>
          >> >> thank you,
          >> >> Samuel
          >> >
          >> > Assuming the DataGrid has its DataSource as a DataTable's DefaultView,
          >> > you would add another DataColumn to the DataTable and hide it:
          >> >
          >> > DataSet.Tables( table).Columns( column).ColumnM apping() =
          >> > MappingType.Hid den
          >> >
          >> >
          >> > B.
          >> >[/color][/color]
          >
          > Setting a DataSource on a Windows Form DataGrid does not require a
          > binding.
          >
          > B.
          >[/color]


          Comment

          • Brian Tkatch

            #6
            Re: DataGridView Question - VB.NET 2005


            Samuel Shulman wrote:
            I populate it manually
            >
            "Brian Tkatch" <Maxwell_Smart@ ThePentagon.com wrote in message
            news:1151610694 .610444.92450@b 68g2000cwa.goog legroups.com...

            Samuel Shulman wrote:
            I actually don't bind it
            >
            Samuel
            >
            >
            "Brian Tkatch" <Maxwell_Smart@ ThePentagon.com wrote in message
            news:1151593790 .964053.160700@ d56g2000cwd.goo glegroups.com.. .

            Samuel Shulman wrote:
            Hi
            >
            I am starting to use this powerful controls but I am having a little
            problem
            >
            When I use ListView Control I could inherit the ListViewItem to add
            additional members typically for the Row ID in the database some times
            of
            more than 1 record (if the row contains related data from a number of
            tables) then I had all this info attached to each row
            >
            How can I achieve anything like that in the DataGridView control?
            >
            thank you,
            Samuel

            Assuming the DataGrid has its DataSource as a DataTable's DefaultView,
            you would add another DataColumn to the DataTable and hide it:

            DataSet.Tables( table).Columns( column).ColumnM apping() =
            MappingType.Hid den


            B.
            Setting a DataSource on a Windows Form DataGrid does not require a
            binding.

            B.
            Perhaps you can adda DataGridMapping , add extra columns there, and set
            the width to zero.

            B.

            Comment

            Working...