How to make resizing possible in the additional row headers of the WinForms GridControl and GridDataBoundGrid?
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:
//Sets the number of Rows/Columns HeaderCount in GridControl this.gridControl1.Rows.HeaderCount = 1; this.gridControl1.Cols.HeaderCount = 1;
'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.
//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;
'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
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.
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 forums, Direct-Trac, or feedback portal. We are always happy to assist you!