I am new to webix so forgive me if this is a stupid question or already has an open discussion. I have a datatable with contextmenu initialized on it. Now the data in the context menu is hard-coded but I would like some items to be greyed based on a global flag i.e. if flag is true I want all items in the context menu to be clickable else only a few items
you may handle “onBeforeShow” event and use “disableItem” method.
{
view: "contextmenu",
data: [
{id: "idToDisable", value: "this is disabled",
{id: "id", value: "click me"}
]
on: {
onBeforeShow: function() {
if (condition) {
this.disableItem("idToDisable");
}
}
}
}
That was some genius! Thanks a lot.