Our pure JavaScript Scheduler component


Post by Bernd33 »

Hi,

i wasn't able to find a answer yet in the documentation regarding populating further data fields (combo boxes) besides from the resource field in a customized task editor.

Background:
I have a database table which includes the "severity"/priority of events (regular, urgent, etc.) and want to include that data fields from the database into the customized event/task editor in SchedulerPro.

There is a comboBox called "label" and i want to populate it with the data from the database in regards of priority, but i was not able to find a possiblity besides the "resourceStore" or the "eventStore" (which are already used for resources and event data)

So is it possible to include some further data (i guess yes) but i wasn't able yet to do so.

Thx in advance,
Bernd


Post by alex.l »

Hi Bernd,

Looks like we missed this article for the SchedulerPro, but take a look at this one, it still may be helpful: https://bryntum.com/docs/gantt/#guides/customization/taskedit.md

It two words, the best place to put your logic is https://bryntum.com/docs/scheduler-pro/#SchedulerPro/feature/TaskEdit#event-beforeTaskEditShow event

const schedulerPro = new SchedulerPro({
    features : {
        taskEdit : {
            items : {
                equipment : {
                    // custom field configuration
                },
                volume : {
                    // custom field configuration
                }
            }
        }
    },
    listeners : {
        beforeTaskEditShow({ editor, taskRecord }) {
            const
                equipmentCombo = editor.widgetMap.equipment,
                volumeField = editor.widgetMap.volume;

        // update data in combo list
        equipmentCombo.items = this.equipmentStore.getRange();
        // update field visibility state
        volumeField.hidden = !taskRecord.hasVolume;
    }
}
});

All the best,
Alex


Post by Bernd33 »

Hi Alex, thx for your help I'm already some steps further. Is there also some example how to define the custom Store "equipmentStore" properly? I wasn't able to find a suitable example :(.

Thx!


Post by Bernd33 »

Hi Alex,
nevermind - i found an example via https://www.bryntum.com/examples/scheduler/drag-onto-tasks/
but I'm curious if there are any further examples available or a detailed description in the documentation?


Post by alex.l »

if there are any further examples available or a detailed description in the documentation?

What equipmentStore are we talking about? If you meant how to configure AjaxStore, then it is here: https://bryntum.com/docs/scheduler/#Core/data/AjaxStore

All the best,
Alex


Post Reply