Hi team,
We need to show context menu even there is no record in the grid. can you please help us how to achieve this thing. is there any function to trigger context menu whenever needed?
Support Forum
Hi,
Yes, sure. There is a similar thread about this here viewtopic.php?t=23328
This should solve your issue
Hi I am not getting how to use this code in VUE js
useEffect(() => {
if (ref && ref.current) {
(ref.current.instance.subGrids as any)[
"locked"
].currentElement.addEventListener("contextmenu", (ev: any) => {
if (ref && ref.current) {
menu.show();
menu.setXY(ev.clientX, ev.clientY);
// console.log(ref.current.instance.features.cellMenu.menu);
// ref.current.instance.features.cellMenu.menu.show();
// ref.current.instance.features.cellMenu.menu.setXY(
// ev.clientX,
// ev.clientY
// );
}
ev.preventDefault();
});
}
}, []);
We could allow the CellMenu feature to be configured to show when not on a cell: https://github.com/bryntum/support/issues/6316
Hi,
Did you mean to listen for the cell menu item click?
Please check this https://bryntum.com/products/grid/docs/api/Core/widget/Menu
And there is all the events you can listen for https://bryntum.com/products/grid/docs/api/Core/widget/Menu#events
I hope, I understood you correctly