Category / Section
How to change or edit the column header text in a WinForms GridGroupingControl?
1 min read
Change the column header
To change the column header text in a WinForms GridGroupingControl, you can use the HeaderText property of TableDescriptor.
//Using Column index
this.gridGroupingControl1.TableDescriptor.Columnsa[2].HeaderText="Hello";
//Using Column name
this.gridGroupingControl1.TableDescriptor.Columns["CompanyName”].HeaderText="Hello";
'Using Column index
Me.gridGroupingControl1.TableDescriptor.Columns(2).HeaderText="Hello"
'Using Column Name
Me.gridGroupingControl1.TableDescriptor.Columns("CompanyName”).HeaderText="Hello"
After applying the properties, the header text is displayed as follows.
Figure 1: Changing the header text
Samples:
C#: HeaderText
VB: HeaderText