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
910
How to Collapse All Cards or Expand All Cards?
posted

Hi

I currently have all my cards defaulted to collapsed.

If the user goes in and manually expands a few cards through out the list.

I like to have a way to callapse them all and vice versa.

If the user has a bunch of cards expanded.  I like to beable to expand all the rest of the cards.

Is there a easy and simple way of doing this ?  I like to hook this up to two buttons.

Thanks

Allen

Parents
No Data
Reply
  • 8421
    Suggested Answer
    posted

    Hello Allen,

    The easiest way to do this is to set the XamDataCards' ViewSettings.ShouldCollapseCards to true or false. However, please note that this will not take in to account any changes in the settings that the user may have made to explicitly set a panel to be collapsed or expanded.

    If you want to override what the user has set and make sure all cards are expanded or collapsed at the same time then you'll need to set the collapsed state on all the individual cards to the default. To do this, iterate through all the records and set the Record.IsContainingCardCollapsed property to null.

    Please let me know if you have any further questions or concerns about this matter.

Children