Hi there,
Can anyone tell me how to hide a column in a datagrid??.. I have tried to
assign a DataGridTableStyle to the datagrid, but it does not seems to work??
It shows all rows instead of the one speciffied?? see below..
Thanks
Dim ts As New DataGridTableStyle()
ts.MappingName = "Orders"
Dim colOrder As New DataGridTextBoxColumn()
With colOrder
.MappingName = "OrderID"
.HeaderText = "CustomerOrderID"
.Width = 100
.ReadOnly = True
End With
ts.GridColumnStyles.Add(colOrder)
DataGrid1.TableStyles.Add(ts)
ts = Nothing
colOrder = Nothing
DataGrid1.DataSource = CustomerOrdersDataSet.Tables(0)