We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Collapsed records

Hi. 

When I change the ItemsSource, all records are expanded. How to change the default behavior, that all records will be collapsed at the begining (when I change ItemsSource)?

Thanks.
Regards,
Juraj

2 Replies

SR Sabaridass Ramamoorthy Syncfusion Team February 12, 2016 10:13 AM UTC

Hi Juraj,

Thank you for contacting Syncfusion Support.

Expand and collapse states of PivotRows and PivotColumns is maintain by setting the property StatePersistenceEnabled as true.

We have maintained the states using the unique names. So, when you change the Item Source, a new set of fields and unique names comes into existence where the state cannot be maintained. To be clearer, field and unique names in one Item Source will differ from another.  This is a valid behavior and not an issue.

Regards,

Sabaridass R.


SR Sabaridass Ramamoorthy Syncfusion Team February 12, 2016 11:21 AM UTC

Hi Juraj,

In the previous update, we missed adding the following point.

When changing the ItemSource, you can display the PivotRows and PivotColumns in collapsed states by calling the method “CollapseAllGroup()” in PivotGridControl. In order to achieve this behavior in your sample, call the method “CollapseAllGroup()” after assigning the ItemSource to the PivotGridControl.

Regards,
Sabaridass R.

Loader.
Live Chat Icon For mobile
Up arrow icon