Home All Groups Group Topic Archive Search About

DataGridView Question - VB.NET 2005

Author
29 Jun 2006 2:38 PM
Samuel Shulman
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

Author
29 Jun 2006 3:09 PM
Brian Tkatch
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).ColumnMapping() =
MappingType.Hidden


B.
Author
29 Jun 2006 3:31 PM
Samuel Shulman
I actually don't bind it

Samuel


Show quoteHide quote
"Brian Tkatch" <Maxwell_Sm***@ThePentagon.com> wrote in message
news:1151593790.964053.160700@d56g2000cwd.googlegroups.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).ColumnMapping() =
> MappingType.Hidden
>
>
> B.
>
Author
29 Jun 2006 7:51 PM
Brian Tkatch
Samuel Shulman wrote:
Show quoteHide quote
> I actually don't bind it
>
> Samuel
>
>
> "Brian Tkatch" <Maxwell_Sm***@ThePentagon.com> wrote in message
> news:1151593790.964053.160700@d56g2000cwd.googlegroups.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).ColumnMapping() =
> > MappingType.Hidden
> >
> >
> > B.
> >

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

B.
Author
29 Jun 2006 8:43 PM
Samuel Shulman
I populate it manually

Show quoteHide quote
"Brian Tkatch" <Maxwell_Sm***@ThePentagon.com> wrote in message
news:1151610694.610444.92450@b68g2000cwa.googlegroups.com...
>
> Samuel Shulman wrote:
>> I actually don't bind it
>>
>> Samuel
>>
>>
>> "Brian Tkatch" <Maxwell_Sm***@ThePentagon.com> wrote in message
>> news:1151593790.964053.160700@d56g2000cwd.googlegroups.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).ColumnMapping() =
>> > MappingType.Hidden
>> >
>> >
>> > B.
>> >
>
> Setting a DataSource on a Windows Form DataGrid does not require a
> binding.
>
> B.
>
Author
2 Jul 2006 1:34 PM
Brian Tkatch
Samuel Shulman wrote:
Show quoteHide quote
> I populate it manually
>
> "Brian Tkatch" <Maxwell_Sm***@ThePentagon.com> wrote in message
> news:1151610694.610444.92450@b68g2000cwa.googlegroups.com...
> >
> > Samuel Shulman wrote:
> >> I actually don't bind it
> >>
> >> Samuel
> >>
> >>
> >> "Brian Tkatch" <Maxwell_Sm***@ThePentagon.com> wrote in message
> >> news:1151593790.964053.160700@d56g2000cwd.googlegroups.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).ColumnMapping() =
> >> > MappingType.Hidden
> >> >
> >> >
> >> > 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.