Add/Del item of selectbutton


#1

    const dataset = [

        {

            type: “block”,

            direction: “col”,

            “items”: [

                {

                    value: “New”,

                    icon: “dxi dxi-file-outline”,

                    size: “auto”,

                }

            ]

        },

        {

            type: “block”,

            direction: “col”,

            “items”: [

                {

                    value: “Save”,

                    icon: “dxi dxi-file-export”,

                    size: “small”,

                },

                {

                    value: “Remove”,

                    icon: “dxi dxi-delete”,

                    size: “small”,

                },

                {

                    id:“select”,

                    type: “selectButton”,

                    value: “jpeg”,

                    size: “small”,

                    count: 20,

                    items: [

                        {

                            value: “jpeg”,

                            hotkey: “alt+1”

                        },

                        {

                            value: “pdf”,

                            hotkey: “alt+2”

                        },

                        {

                            value: “png”,

                            hotkey: “alt+3”

                        }

                    ]

                }

            ]

        }

    ];

Using a SelectButton of a Ribbon control, is there any way to add or delete a item of a select options dynamically after it has been parsed? For instance insert a “bmp” option to selectbutton.


#2

Hello.

Unfortunately the only solution is to reload your ribbon completely.