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
235
Restoring of expand/collapse state of groups
posted

Hi.

I have a requirement in my project to restore expand/collapse state of groups. I thought that the best place for this logic is InitializeRecord event handler. It works fine if i have one level of groupings, but when there are more than one level of groupings it does not work. Because there could be the following situation:

- Group1

   - Group11

      Item1

      item2

   - Group12

      Item3

      Item4

+Group2

   - Group21 (currently invisible)

       item5

       item6

When groups are restored the "Group2" have expanded state. I think this is because records are initialized from parents to children and when i restore expanded state of "Group21" the "Group2" expands too.

Could you provide a solution to my issue?

Parents
  • 9836
    Suggested Answer
    posted

    Hello,

    One option is to create a style for the DataRecordPresenter and either bind the IsExpanded property of the record to a boolean property in your datasource or use a converter for the value. In the converter you may check the index of the DataRecord, the layout etc.

    Let me know if that works for you.

     

Reply Children
No Data