Context Menu
The Kendo UI for Vue Data Grid enables you to display a context menu by using the built-in Context Menu component. The onContextMenu event is fired when grid cells are rendered and the context menu is triggered on a right click.
The built-in context menu of the Grid allows you to control the rows selection and the column sorting. To enable it you should:
-
Set the
contextMenuprop of the Grid totrueto enable the ContextMenu component. -
Enable the
selectableprop to allow rows selection. -
(Optional) Set the
sortableprop to true to allow column sorting, and take care of the built-insortstate. -
(Optional) Add a column with
columnType="checkbox"to render a checkbox selection column.
<Grid
:context-menu="true"
:sortable="true"
:selectable="{ enabled: true }"
:columns="columns"
>
</Grid>
You can see the default Context menu of the Grid in action in the demo below.