An Easier Way To Hide Columns

I know that if you want to hide a column you can remove the column from the visible columns collection. Is there an easier way that does not require you to remember the position of the column so that when you make it visible you add it back in the correct order. I'm using the GGC.

1 Reply

AD Administrator Syncfusion Team March 1, 2007 09:23 PM UTC

Hi Joel,

You can use the RemoveAt and Insert method of the GridVisibleColumnCollection to hide and show the column at required postion. Here is a code snippet.

//Hide the column.
this.gridGroupingControl1.TableDescriptor.VisibleColumns.RemoveAt(1);
//show the column at specific position.
this.gridGroupingControl1.TableDescriptor.VisibleColumns.Insert(1,"ColumnName");

Best regards,
Haneef

Loader.
Up arrow icon