Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
350
How to apply CellValuePresenter style in AssignFieldLayout
posted

Hello,

I have a multilevel hierarchical XamDataGrid. I wan to Indent parent and child in only first column of every child record.

For this, I tried to apply CellValuePresenter style to first column of child record's FieldLayout with Left Margin 20.

It works fine for first child record but for second child level onwards also it applies margin 20 to first field.

Whereas for second child now left margin should be 40 and third level child should have left margin of 60 and so on.

I thought of achieving this by applying cellvaluepresenter to every field layout from code behind by multiplying left margin by nesting depth of current record or by adding 20 to parent record's margin. Is this possible?  

How do I achieve this? or is there any work around. Other solutions are not working as expected for me.

Thanks,

Priya