We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to increase the column width of the rowheader in WinForms GridGroupingControl?

Platform: WinForms |
Control: GridGroupingControl
Tags: rowheader, header

Column width of rowheader

The column width of the RowHeaders can be increased, based on its values in the GridGroupingControl, through the QueryColWidth event. The change of row header width is used in the NumberedRowHeaders. The following code example demonstrates the same.


//Increases the ColWidth of the NumberedRowHeader.this.gridGroupingControl1.TableModel.QueryColWidth += TableModel_QueryColWidth;
void TableModel_QueryColWidth(object sender, GridRowColSizeEventArgs e) 
if(e.Index ==0)
     //Increases the RowHeader width based on digit count.
     e.Size = 30;
     e.Handled = true;



'Increases the ColWidth of the NumberedRowHeader.
Private Me.gridGroupingControl1.TableModel.QueryColWidth += AddressOf TableModel_QueryColWidth
Private Sub TableModel_QueryColWidth(ByVal sender As Object, ByVal e As GridRowColSizeEventArgs)
  If e.Index =0 Then
     'Increases the RowHeader width based on digit count.
     e.Size = 30
     e.Handled = True
  End If
End Sub


The following images show the column width of the RowHeaders before and after the increase.

Before using QueryColWidth event in GridGrouping control

Figure 1: Before using the QueryColWidth event


After using QueryColWidth event in GridGrouping control

Figure 2: After using the QueryColWidth event


C#: https://www.syncfusion.com/downloads/support/directtrac/general/CS737315718.zip

VB: https://www.syncfusion.com/downloads/support/directtrac/general/VB1023996440.zip

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile