We're working with Bryntum Scheduler on an Angular 8 project.
1.How can i get all selected rows?
2. I am trying to create multi resource selection feature. I use the selectionMode for this but I have a problem when I multi select the resources the rows is real select but the cells not(only the last clicked resource cell selected).
My implementation:
the configuration:
initConfig() {
this.schedulerConfig = {
selectionMode: {
row: true,
cell: true,
multiSelect: true,
rowCheckboxSelection: false,
checkbox: false,
showCheckAll: false
}
};
<bry-scheduler
[useInitialAnimation]="schedulerConfig.useInitialAnimation">
</bry-scheduler>
// This function take care of all resource clicks.
resourceClick(
event: {
grid: Scheduler;
record: GanttResource;
column: ResourceInfoColumn,
cellSelector: object,
cellElement: HTMLElement,
target: HTMLElement,
event: MouseEvent,
source: Scheduler,
type: string
}) {
this.storeService.getResourcesPromise().then((resources: IResourceDTO[]) => {
// Save the resource's data in resourceMenuService.
this.lastSelectedResource = resources.find((resource: IResourceDTO) => resource.ei === event.record.get('id'));
// After click change selecting resource.
this.ganttService.multiSelectedResource(event.record, this.scheduler.schedulerEngine);
// Clear the job in jobMenuService and reculculate ToolbarMenu.
this.lastSelectedJob = null;
this.jobMenuService.recalculateMenu(this.lastSelectedJob);
});
}
// multi selected resource.
multiSelectedResource(resource: GanttResource, schedulerEngine: Scheduler) {
schedulerEngine.selectRow({
record: resource,
addToSelection: true
});
}