Our pure JavaScript Scheduler component


Post by license »

Hi Team,

Is there any listener available to read and assign Column picker values? we have a requirement to read column picker values and assign it back programmatically in some specific scenario's, do let us know if any exist, if not suggest us with a workaround.


Post by mats »

Can you please explain what "column picker values" you refer to? Do you mean this menu?

Attachments
Screenshot 2022-09-26 at 12.52.10.png
Screenshot 2022-09-26 at 12.52.10.png (151.27 KiB) Viewed 366 times

Post by license »

Yes please refer the below screen shot for the same

Attachments
MicrosoftTeams-image (50).png
MicrosoftTeams-image (50).png (22.29 KiB) Viewed 363 times

Post by tasnim »

    features : {
        headerMenu : {
            items : {
                columnPicker : {
                    listeners : {
                        item (event) {
                            // Current clicked item
                            console.log(event.item);
                            
// get all items in the menu console.log(event.items.columnPicker.menu.items); // you can hide columns like this event.source.columns.allRecords[0].hidden = true } } } } } }

Docs :
https://bryntum.com/docs/scheduler/api/Grid/feature/HeaderMenu
https://bryntum.com/docs/scheduler/api/Core/widget/Menu#events


Post by license »

Thanks Tasnim,

This example will resolve one of the requirement to get columnPicker values, But our another requirement is need to store value of event.items.columnPicker.menu.items after any change and re-apply it to columnPicker, so how do we set columnPicker values to scheduler?


Post by tasnim »

The columnPicker only visualizes the columns from the column store. Trying to listen to an event and manipulate the menu is going about it wrong, you should interact with the column store

Please check the docs :
https://bryntum.com/docs/scheduler/api/Grid/data/ColumnStore


Post Reply