Articles in this section
Category / Section

How to disable the resizing rows in WinForms GridControl?

1 min read

Resizing the rows

The grid control has a row/column resizing option upon keeping the cursor near the row/column splitter by default. In order to disable the resizing option, you can use ResizingRows event.

C#

//Event handler
this.grid.ResizingRows += grid_ResizingRows;
 
void grid_ResizingRows(object sender, GridResizingRowsEventArgs e)
      {
           //To disable resizing of rows.
           e.Cancel = true;
      }

 

VB

'Event handler
 Me.grid.ResizingRows += grid_ResizingRows
 
Private Sub grid_ResizingRows(ByVal sender As Object, ByVal e As GridResizingRowsEventArgs)
  'To disable resizing of rows.
   e.Cancel = True
 End Sub

 

Samples:

C#: ResizingRows_CS

VB: ResizingRows_VB

 

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