Hi there. I'm working with a pivot grid in NAB and am looking for a way to fully expand or collapse a pivot grid with a button click on the widget. Is there a way to accomplish this? I see a button to fully expand when the widget is first opened in NAB but I don't see a way to accomplish this at runtime.
Announcement
Collapse
No announcement yet.
Expand/Collapse Pivot Grid
Collapse
X
-
Right now you can accomplish this with Execute Script with a small amount of code.
Expand All Columns/Rows
Code:// get the customer pivot widget // var customerPivot = getWidget('customerPivot'); // go down the pivot grid and request to expand all columns/rows // customerPivot.down('pivotgrid').expandAll(); success();
Collapse All Columns/Rows
Code:// get the customer pivot widget // var customerPivot = getWidget('customerPivot'); // go down the pivot grid and request to collapse all columns/rows // customerPivot.down('pivotgrid').collapseAll(); success();
Thanks
-
Next Valence 6 update will have the following link to app vars for the pivot widget;
pivotLinkToAppVars.png
Thanks
Comment
-
Ah ha. That means I can use .down to get the base ExtJS object type then. Good to know. Is that in the documentation anywhere? I was trying to track something like that down but could not find it.
I'll look forward to that update too. Thank you.
Comment
-
As a followup to this now that this is in place, I'm running into an issue with having these controlled by app variables. The issue is that I want both the Expand and Collapse buttons to ALWAYS work when you push the button. This is because the user can hit "Expand All" for instance and expand all the rows. It does this initially by setting an expand variable to True. The user then manually collapes a few rows and do their thing and then wants to re-expand them all again. They hit the button again but the app variable is already set to True so it doesn't work anymore. I could add a separate "Collapse All" button that would set a collapse variable and clear the expand variable but that shouldn't be necessary.
Is there a way to always clear out the expand variable once the pivot grid has performed the expand?
Comment
Comment