LyteNyte Grid enables you to render context menus for specific grid elements, enhancing interactive capabilities.
Use the contextMenuRenderer
property on the grid state to provide the menu LyteNyte displays
when a user triggers the context menu. LyteNyte supplies the renderer with contextual information
including the target element and its row and column indices.
This guide assumes you're familiar with LyteNyte Grid's menu components. For complete details, see the menu frame guide.
Implement the contextMenuRenderer
to provide LyteNyte Grid with your context menu.
Here's a concrete example:
When a user triggers a context menu event on LyteNyte Grid, the grid identifies the target element.
This target may be a header
, floating header
, header group
, or grid cell
. You can customize
the menu display based on this target type.
You can control when to display a context menu by using the contextMenuPredicate
property. This
property determines whether the grid shows a context menu or allows the default browser behavior.