devxlogo

October 30, 2009

The Best Way to Hide a Column in a DataGrid

Typically, developers hide a DataGrid column by getting the index of the column to be hidden, and then hiding it in the ItemCreated event as follows: e.Item.Cells[myColumnIndex].Visible = false; That