Articles in this section
Category / Section

How to remove a column in GridDataBoundGrid?

1 min read

To remove a column from GridDataBoundGrid, grid.Binder.InternalColumns.Remove method can be used.

C#

GridBoundColumn column = this.gridDataBoundGrid1.Binder.InternalColumns["ContactName"];
 
//To remove the column using GridBoundColumn mapping name
this.gridDataBoundGrid1.Binder.InternalColumns.Remove(column);
 
//To remove column at the given index
this.gridDataBoundGrid1.Binder.InternalColumns.RemoveAt(3);

VB

Dim column As GridBoundColumn = Me.gridDataBoundGrid1.Binder.InternalColumns("ContactName")
 
'To remove the column using GridBoundColumn mapping name
Me.gridDataBoundGrid1.Binder.InternalColumns.Remove(column)
 
'To remove column at the given index
Me.gridDataBoundGrid1.Binder.InternalColumns.RemoveAt(3)

 

Sample

RemoveColumns_C#

RemoveColumns_VB

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied