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
1080
How to get Index of FieldLayout
posted

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?

 

Parents
  • 22852
    Verified Answer
    Offline posted

    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

Reply Children
No Data