By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,795 Members | 1,660 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,795 IT Pros & Developers. It's quick & easy.

composite table made of column objects

P: n/a
max
Dear Group,

I'm just learning Windows Forms and C# (just in time for it to be
replaced by MS What's Next) and have a question concerning displaying
columnar data in a single datagridview.

My data is stored as a collection of column objects , each of which
contains an array of values as well as datatype info. I want to
assemble an ordered group of these columns into a data table and use a
datagridview to manipulate it. Basically, this is the same thing as
a list of records but my data is stored in column-order rather than
row order. I would like to dynamically be able to add and delete
columns from the group.

How can I collect these columns into a virtual table of records and
have the data binding mechanism provide the connection between the
grid & the virtual table? Utilmately, I'd like this table definition
to be dynamic. Also, copying is not an option -- I've got way too
much data.

Thanks for your guidance.

Max
Jun 24 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
In this case, you will want to use the virtual mode of the DataGridView.
You can do this by setting the VirtualMode property of the instance to true.
You will then have to respond to the events that the DataGridView fires to
populate the view. For more information on how to do that, check out the
section of the MSDN documentation titled "Walkthrough: Implementing Virtual
Mode in the Windows Forms DataGridView Control", located at:

http://msdn2.microsoft.com/en-us/library/15a31akc.aspx
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"max" <myaffe_at_gamry_dot_comwrote in message
news:09********************************@4ax.com...
Dear Group,

I'm just learning Windows Forms and C# (just in time for it to be
replaced by MS What's Next) and have a question concerning displaying
columnar data in a single datagridview.

My data is stored as a collection of column objects , each of which
contains an array of values as well as datatype info. I want to
assemble an ordered group of these columns into a data table and use a
datagridview to manipulate it. Basically, this is the same thing as
a list of records but my data is stored in column-order rather than
row order. I would like to dynamically be able to add and delete
columns from the group.

How can I collect these columns into a virtual table of records and
have the data binding mechanism provide the connection between the
grid & the virtual table? Utilmately, I'd like this table definition
to be dynamic. Also, copying is not an option -- I've got way too
much data.

Thanks for your guidance.

Max
Jun 24 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.