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 set a column width in WinForms GridListControl?

Platform: WinForms |
Control: GridListControl
Tags: columnwidth

Column width

To set the width of a GridListControl’s particular column, ColWidths property or QueryColWidth event can be used.

Using ColWidths property


//To change the width of the columns.
this.gridListControl1.Grid.Model.ColWidths["CategoryName"] = 125;
this.gridListControl1.Grid.Model.ColWidths["Description"] = 125;


'To change the width of the columns.
Me.gridListControl1.Grid.Model.ColWidths("CategoryName") = 125
Me.gridListControl1.Grid.Model.ColWidths("Description") = 125


Using QueryColWidth event

The column width can be set by setting the Size property. The e.Handled property should be set to true.


//Event subscriptions.
this.gridListControl1.Grid.QueryColWidth += Grid_QueryColWidth;
//Event Customization
private void Grid_QueryColWidth(object sender, GridRowColSizeEventArgs e)
    if (e.Index == 1 || e.Index == 2)
        e.Size = 125;
        e.Handled = true;



'Event subscriptions.
AddHandler Me.gridListControl1.Grid.QueryColWidth, AddressOf Grid_QueryColWidth
'Event Customization
Private Sub Grid_QueryColWidth(ByVal sender As Object, ByVal e As GridRowColSizeEventArgs)
    If e.Index = 1 OrElse e.Index = 2 Then
        e.Size = 125
        e.Handled = True
    End If
End Sub



Set the column width in GridListControl

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