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

Customization of row height Sfdata grid

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,

1 Reply

GM Gobikrishnan Murugesan Syncfusion Team 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: 

Live Chat Icon For mobile
Up arrow icon