How do I hide a column in a datagrid

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
 
C

Chris Shepherd

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top