Is it possible to have a resource group collapsed by default on page load?
I know I can grid.collapseAll() to collapse all groups when the page loads, but can I also do this for a single group?
As a case example, I have a group for "ex employees" (i.e. those who have left us) and I want to display them in the scheduler, but in a group that is collapsed by default so they don't take up space if you don't open that group.
Would this be possible, either by setting a property on the group, or by collapsing said group with javascript after the page loads? I couldn't find anything in the docs on this.
Hi mats! That looks useful. Was this a feature in Bryntum 4.x also? (I'm still running version 4).
And if so, how would you implement this? I'm getting scheduler.toggleCollapse() is not a function.
I tested it in our online example and it works fine. Could you please provide us a runnable test case so we can debug and give you the solution easily?
If you check the resourceStore in the example (one way to check is to write scheduler.features.group.resourceStore in the console), you'll see that the id of the resources is not 1,2,3, and so on. And we have registered for the groups as well, so if you run
while scheduler.features.group.toggleCollapse('group-header-Consultants'); indeed works,
doing scheduler.features.group.resourceStore in the console on the example gives me an "undefined" response, so I am still unable to figure out the id's of my own groups.
So I'm wondering, is scheduler.features.group.resourceStore correct? Or should it be something else to get an overview of the groups and their id's?