I'm working with a hierarchical xamDataGrid. I often see references to FieldLayouts (e.g. in the xamDataGrid, DataRecord etc. ). In the debugger I see an Index for each FieldLayout which tells me to what hierarchy level a record belongs. But when I want to use the Index of the FieldLayout in my code, there does not seem to be such a property!? How can I determine the index of a FieldLayout in my code?
Hi Allen
Thanks for your reply. It works perfectly! I use this code now in the FieldLayoutInitializing event of a xamDataGrid. Depeding on the index (that corresponds to the hierarchy level) I so can change the style of the layout.
Markus
Hello,
If you already have a reference to the DataRecord and you would like to find the index of its FieldLayout, you can use the following to return the index:
int index = XamDataGrid1.FieldLayouts.IndexOf(record.FieldLayout);
In the above example, record is the DataRecord.
Let me know if you have any questions with this matter.
Alan