We have analyzed your query. We have created simple sample based on your requirement. When large text in collection is loaded to the grid and columns have defined TextWrapping with wrap the content is wrapped with the default row height. The row height can grow automatically with the text length by handling QueryRowHeight event. The QueryRowHeight event is called again for that row alone and it resizes the row based on the edited content. The row to be resized with text that you have typed after editing in the cell, you can use CurrentCellEndEdit event and it will reset the row height internally. Please refer the attached sample and link,
Sample: http://www.syncfusion.com/downloads/support/forum/118746/SfDataGrid_RowHeight-663259469.zip
Link:
http://help.syncfusion.com/ug/wpf/index.html#!Documents/autorowheight.htm
http://help.syncfusion.com/ug/wpf/index.html#!Documents/howtherowheightcanautogrowwiththetextlength.htm
Please let us know if you have any concerns.
Regards,
Muthukumar K
Hi Avdesh,
You can access the collection of rows in SfDataGrid through VisualContainer and you can set the Height for individual rows also as in the below code snippet.
using Syncfusion.UI.Xaml.Grid.Helpers; this.grid.Loaded += grid_Loaded; void grid_Loaded(object sender, RoutedEventArgs e) { var visualContainer = grid.GetVisualContainer(); var rowcount = visualContainer.RowHeights.LineCount; // specific row height visualContainer.RowHeights[3] = 70; visualContainer.InvalidateMeasure(); } |
Note: This is not recommended way. While sorting and grouping these settings will reset. If the above way meets your requirement you can use this.
Please let us know if you have any questions.
Thanks,
Sivakumar