How to Hide or Unhide the Columns in a Grouping Grid

15 Jun 20211 minute to read

The TableDescriptor object has VisibleColumns collection that you can use to control the columns that are visible. You can hide or unhide columns using the following code.

  • C#
  • //Hides.
    this.gridGroupingControl1.TableDescriptor.VisibleColumns.Remove("Col1");
    
    //Unhide.
    this.gridGroupingControl1.TableDescriptor.VisibleColumns.Add("Col1");
  • VB
  • 'Hides.
    Me.gridGroupingControl1.TableDescriptor.VisibleColumns.Remove("Col1")
    
    'Unhide.
    Me.gridGroupingControl1.TableDescriptor.VisibleColumns.Add("Col1")