Dataset & columns

mistaken_myst

Active member
Joined
Oct 29, 2007
Messages
25
Programming Experience
Beginner
need urgent help..plz ..

Column(1) .....(6) (7)..

1. How can I move a column(1) to between (6) & (7) in a DataTable? (or do I need to use a 'temporarily created column' to use for swaping?)
2. I there a way to 'hide' a Column or does the Column need to be deleted?
 
You can hide a column by doing this:

VB.NET:
datagridview.Columns("colname").Visible = False

You can move a column by using the 'Insert' and 'Remove' properties of the datagridview.
 
DataGridView is the name of your datagridview control. I think its just the same in .NET 1.1.
 
I think its just the same in .NET 1.1

It's called a datagrid is VS2003, but to hide the column is exactly the same procedure.

What is datagridview here? is it the name of the DataGrid?

Yes.

Simply use
VB.NET:
[B]MyGridName[/B].Columns("[B]ColumnName[/B]").Visible = False

and replace the two words in bold with the name of your grid, and the name of your column.
 
Back
Top