Articles in this section
Category / Section

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

2 mins read

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

Sample:

ResizingAdditionalRowHeader-VB.zip


Conclusion

I hope you enjoyed learning about how to make resizing possible in the additional row headers of the WinForms GridControl and GridDataBoundGrid.

You can refer to our WinForms Grid feature tour page to know about its other groundbreaking feature representations. You can also explore our WinForms Grid documentation to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

 


Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied