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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Customization of row height Sfdata grid

Thread ID:





129984 Apr 13,2017 11:01 AM UTC Apr 14,2017 04:37 AM UTC UWP 1
Tags: SfDataGrid
Asked On April 13, 2017 11:01 AM UTC

Hi ,
I am new to UWP development, I am using syncfusion controls in my application. I am using datagrid, i am displaying few lengthy text in some columns, i set TextWrap for those columns. when the text is more, the top and bottom of the content is collapsing due to insufficient  vertical space, how to adjust the ROW height automatically with the content is large. I set Rowheight="45"  for SfDataGrid. even i removed that property it's not changing.

Please give me solution. Thanks in advance,

Gobikrishnan Murugesan [Syncfusion]
Replied On April 14, 2017 04:37 AM UTC

Hi Murali, 
Thank you for contact Syncfusion support. 
We have analyzed your query. You can able to achieve your requirement by using QueryRowHeightEvent in SfDataGrid as like below code sample, 
Code sample: 
GridRowSizingOptions gridRowResizingOptions = new GridRowSizingOptions(); 
//To get the calculated height from GetAutoRowHeight method.     
double autoHeight = double.NaN; 
// The list contains the column names that will excluded from the height calculation in GetAutoRowHeight method. 
List<string> excludeColumns = new List<string>();  
this.dataGrid.QueryRowHeight += dataGrid_QueryRowHeight; 
gridRowResizingOptions.ExcludeColumns = excludeColumns; 
void dataGrid_QueryRowHeight(object sender, QueryRowHeightEventArgs e) 
    if (this.dataGrid.GridColumnSizer.GetAutoRowHeight(e.RowIndex, gridRowResizingOptions, out autoHeight)) 
        if (autoHeight > 45) 
            e.Height = autoHeight; 
            e.Handled = true; 
UG Link for more information about auto row height: 
Sample Link: 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon