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. Image for the cookie policy date

Header Row height changed after upgrading Syncfusion from v7 to v13.3

I am upgrading Syncfusion used in a C#/.NET project from v7 to v13.3.
However I find that the header row height of the grid increased significantly (see attached). We are using a custom class derived from GridControl.

Can I know how to set the height back to before? Thanks!


Attachment: HeaderRow_76c3c0a6.zip

1 Reply

AR Arulpriya Ramalingam Syncfusion Team March 23, 2017 12:23 PM UTC

Hi Angus, 

Thanks for using Syncfusion products. 

We could understand your scenario. We have changed the header RowHeight in 10.3x product version for Themes enhancement and to provide best look and feel. If you want the header height as before, you can customize the row height. Please refer the below table, 

Code snippet 
 

However I find that the header row height of the grid increased significantly (see attached). We are using a custom class derived from GridControl. 
Can I know how to set the height back to before? 
Suggestion 1 
In order to set the row height for header row, QueryRowHeight event can be used. Please make use of below code and sample, 

//Event Triggering 
gridControl1.QueryRowHeight += GridControl1_QueryRowHeight; 
 
//Event Customization 
private void GridControl1_QueryRowHeight(object sender, GridRowColSizeEventArgs e) 
{ 
    if(e.Index==0) 
    { 
        e.Size = 21; 
        e.Handled = true; 
    } 
}  
Suggestion 2 
 
To set the row height for a particular row, RowHeights property can also be used. Please refer the below code, 

//To set the row height for header row 
gridControl1.RowHeights[0] = 21; 


Screenshot 

 

 
 
Regards, 
Arulpriya 


Loader.
Up arrow icon