I'm trying two implement a SfTreeGrid with differnent sized rows. Unfortunately i'm not getting it to work.
I found a feature request for autmatic row sizing. This would help me as well, but a way of adjusting the height manually would be enough.
I've tried different things.
- Setting "TextWrapping" to true in the TemplateColumn didn't work
- Defining the height for the templated control didn't work.
- Using the TreeGridRowGenerator to adjust the height of the FrameworkElement yielded a strange behaviour. It looks like the size has changed, but the rest of the tree grid is not refreshed. So the text and borders of the cell are no longer visible, because they move "behind" the next cell. I've tried to call all invalidate meethods, that I could find but the result stays the same.
Is there any way of defining different row heights in an SfTreeGrid?
Please let us know if your require further assistance from us.
MVMatthias van de WeyerDecember 2, 2019 08:00 AM
thank you for your assistance, this brings me one step further.
Unfortunately I have to bother you again.
I was now trying to update the row heights in the NodeExpanded event. I would like to meassure the cell content, to fit the height to the content. But I can't find a way to match the row index and the related FrameworkElement (i.e. TreeGridRowControl).
var test3 = treeView.GetTreeDataColumnBase(new RowColumnIndex(rowIndex, 2));
It seems like the expand operation is not fully completed, when the event is fired.
Is there a better way to achieve this behavior?
Is there something like a "RowDisplayedEvent"
MAMohanram Anbukkarasu Syncfusion Team December 3, 2019 05:25 AM
Thanks for the update.
SfTreeGrid doesn’t have any event like RowDisplayed as you mentioned. If possible could you please share your runnable application? Otherwise please share the details about how you are measuring the cell content and about the columns defined in the DataGrid with code snippet and a screenshot of your application. These details will be helpful for us to check and provide a prompt solution for your requirement.