Articles in this section
Category / Section

How to change the height of the row in WinForms GridControl?

2 mins read

Change the row height

The GridControl supports setting the height of the row by passing the row index in the RowHeight property or by using the QueryRowHeight event.

 

By using GridModel

C#

//Apply Rowheight to the Row 3.
this.gridControl1.RowHeights[3] = 70;

VB

'Apply Rowheight to the Row 3.
Me.gridControl1.RowHeights(3) = 70

 

By using QueryRowheight

C#

void gridControl1_QueryRowHeight(object sender, Syncfusion.Windows.Forms.Grid.GridRowColSizeEventArgs e)
{
     // Apply Rowheights to the Row 3
     if (e.Index == 3)
     {
         e.Size = 70;
         e.Handled = true;
     }
}

VB

Private Sub gridControl1_QueryRowHeight(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.GridRowColSizeEventArgs)
 'Apply Rowheights to the Row 3
     If e.Index = 3 Then
          e.Size = 70
          e.Handled = True
     End If
End Sub

After applying the properties, the row looks like the following screenshot.

Change the height of a row

Figure 1: Changing the row height

Samples:

C#: Change Height

VB: Change Height

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