I have a schedule set up to use grouping like this:
<ejs-schedule id="fmscheduler" ref="fmscheduler"
:views='views'
:event-settings="eventSettings"
:group='group'>
<e-resources>
<e-resource field='EmployeeID' title='Employee Name' name='Employees' :data-source='checkedEmployees'
text-field='Name' id-field='ID' color-field='Colour'>
</e-resource>
</e-resources>
</ejs-schedule>
The 'group;' property I can set up in one of two ways:
1) group: {
resources: []
}
When the page is first displayed the data is all displayed in a single calendar (no grouping). This is good.
2) group: {
resources: ["Employees"]
}
When the page is first displayed the data is all displayed in groups. This is also good.
Now what I want is for the user to check a checkbox to turn grouping on or off. This is the part I can't get working.
I was thinking that group would be reactive and I just update the group.resources as required. But it doesn't work. I can change the value and the scheduler doesn't redraw itself to toggle the grouping. So first line below I thought would be enough. It doesn't work and so I have added the other lines in the hope it would work but no luck.
this.group.resources.push("Employees");
fmscheduler.dataBind();
fmscheduler.refresh();
If I access: this.$refs.fmscheduler.group I can see that it has changed as I would hope. So I am a little surprised that the refresh() doesn't force it to redraw correctly.
Any ideas on what I am doing wrong?
Thanks
Jeff