Hi Mohanram,
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).
This is what i've tried:
private void NodeExpandedHandler(object sender, NodeExpandedEventArgs e)
{
IPaddedEditableLineSizeHost rowHeights = treeView.GetTreePanel().RowHeights;
TreeGridRowGenerator rowGenerator = treeView.GetTreeGridRowGenerator();
foreach (TreeNode treeNode in e.Node.ChildNodes)
{
int rowIndex = treeView.ResolveToRowIndex(treeNode);
rowHeights[rowIndex] = 50;
treeView.UpdateDataRow(rowIndex);
// Yields the wrong row (next row before expanding)
TreeDataRowBase row = rowGenerator.Items[rowIndex];
// row does not (yet) exist (null)
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"
Thanks again,
Matthias