Hiding columns in data grid

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an unbound datagrid that has the DataSource set at run time depending on the user selection of various catergories
In the Grid there is for column(0) a select command button that is not visible and is used to select the row in the gird
The next column is the column I an trying to hide like so

With grdDatastor
.DataSource = GetData(,,,
.DataKey = "ID
.Databind(
.Column(1).Visible = False <============= This is where I get the erro
End Wit
Coulmn(1) will not always have the same data source i.e it is not always "ID" but i would like to hide it in certain cases. I do this by having a select case in order to set the Datasource
Do I need to hide the column befor the DataBind
Any help is appreciated
Thank

Jawaha
 
you can use TableStyles to hide the columns.

--
Dhaval Faria
Founder, Programmer
Hirdhav (http://www.hirdhav.com)
Microsoft India Community Star


Jawahar said:
I have an unbound datagrid that has the DataSource set at run time
depending on the user selection of various catergories.
In the Grid there is for column(0) a select command button that is not
visible and is used to select the row in the gird.
The next column is the column I an trying to hide like so.

With grdDatastore
.DataSource = GetData(,,,)
.DataKey = "ID"
.Databind()
.Column(1).Visible = False <============= This is where I get the error
End With
Coulmn(1) will not always have the same data source i.e it is not always
"ID" but i would like to hide it in certain cases. I do this by having a
select case in order to set the Datasource.
 
Back
Top