Prevent some DataColumns in a DataTable from being bound to DataGridView

Posted by Rajarshi on Stack Overflow See other posts from Stack Overflow or by Rajarshi
Published on 2010-05-28T10:15:39Z Indexed on 2010/05/28 10:21 UTC
Read the original article Hit count: 249

Filed under:
|
|

Is there any way I can specify that some columns in a DataTable will not be automatically bound to a DataGridView when I set the DataSource property of the DataGridView to the DataTable.

For example, if I have a DataTable with columns as "Id, Name" then can I specify that Id column will not be shown in DataGridView? I know I can set some Visible property in DataGridView after it is bound, but can I specify in the DataTable/DataColumn itself?

© Stack Overflow or respective owner

Related posts about c#

Related posts about winforms