How do I hide a column in a datagrid

  • Thread starter Thread starter TonyJ
  • Start date Start date
T

TonyJ

Hello!

Assume I have a datasource consisting of a database table. This table has 5
column.

If I now want to use a bound datagrid but want to display only 4 of these 5
columns is that possible.

How is that done?

I assume I must hide the column that should not be displayed in some way.

//Tony
 
TonyJ said:
Assume I have a datasource consisting of a database table. This table has 5
column.

If I now want to use a bound datagrid but want to display only 4 of these 5
columns is that possible.

Are we talking a DataGrid in .NET 1.1, or a DataGridView in .NET 2.0+?
How is that done?

I assume I must hide the column that should not be displayed in some way.

With a DataGridView yes, you just set the DataGridViewColumn's Visible
attribute to false.

Chris.
 
Back
Top