Hi Rob,
Use the GridBoundColumns property to manages the bound columns in a GridDataBoundGrid. Here is a code snippet.
//Clear the All columns bound to grid...
this.gridDataBoundGrid1.GridBoundColumns.Clear();
//Add the new column to display in a grid.
GridBoundColumn EmpName = new GridBoundColumn();
EmpName.MappingName = "ColumnName";
this.gridDataBoundGrid1.GridBoundColumns.Add(EmpName);
//Remove a new Column......
this.gridDataBoundGrid1.GridBoundColumns.Remove(EmpName);
this.gridDataBoundGrid1.GridBoundColumns.RemoveAt(1);
this.gridDataBoundGrid1.DataSource = ds.Tables[0];
Sample :
GDBGSingleColumn.zipBest regards,
Haneef