)
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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to make resizing possible in the additional row headers of the WinForms GridControl and GridDataBoundGrid?

Platform: WinForms |
Control: GridControl |
Published Date: April 30, 2011 |
Last Revised Date: February 11, 2020

Resizing additional row header

The additional row or column header does not support resizing. To make the resizing possible for additional row or column headers, refer to the following method.

To add additional row or column headers in the Grid control:

C#

//Sets the number of Rows/Columns HeaderCount in GridControl
this.gridControl1.Rows.HeaderCount = 1;
this.gridControl1.Cols.HeaderCount = 1;

VB

'Sets the number of Rows/Columns HeaderCount in GridControl
Me.gridControl1.Rows.HeaderCount = 1
Me.gridControl1.Cols.HeaderCount = 1

The resizing of additional row headers on the Grid can be made possible by setting the ResizeColsBahaviour flag to Grid.GridResizeCellsBehavior.InsideGrid.

C#

//Sets the resize column and rows behavior for GridControl
this.gridControl1.ResizeColsBehavior |= GridResizeCellsBehavior.InsideGrid;
this.gridControl1.ResizeRowsBehavior |= GridResizeCellsBehavior.InsideGrid;
//Sets the resizing behavior for GridDataBoundGrid
this.gridDataBoundGrid1.ResizeColsBehavior |= GridResizeCellsBehavior.InsideGrid;
this.gridDataBoundGrid1.ResizeRowsBehavior |= GridResizeCellsBehavior.InsideGrid;

VB

'Sets the resize column and rows behavior for GridControl
Me.gridControl1.ResizeColsBehavior = Me.gridControl1.ResizeColsBehavior Or GridResizeCellsBehavior.InsideGrid
Me.gridControl1.ResizeRowsBehavior = Me.gridControl1.ResizeRowsBehavior Or GridResizeCellsBehavior.InsideGrid
'Sets the resizing behavior for GridDataBoundGrid
Me.gridDataBoundGrid1.ResizeColsBehavior = Me.gridDataBoundGrid1.ResizeColsBehavior Or GridResizeCellsBehavior.InsideGrid
Me.gridDataBoundGrid1.ResizeRowsBehavior = Me.gridDataBoundGrid1.ResizeRowsBehavior Or GridResizeCellsBehavior.InsideGrid

Samples:

ResizingAdditionalRowHeaders-C#.zip

ResizingAdditionalRowHeader-VB.zip

 

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
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
Live Chat Icon