This sample demonstrates the usage of context menu in Grid component. Right click anywhere on the Grid to view context menu.
Grid has options to show the context menu when right click on it. To configure the items in context menu, you should define
either default or custom item in
. Each item will be shown based on it target. The default items are
edit - Edit the current record.
delete - Delete the current record.
save - Save the edited record.
cancel - Cancel the edited state.
copy - Copy the selected records.
pdfExport - Export the grid as Pdf format.
excelExport - Export the grid as Excel format.
csvExport - Export the grid as CSV format.
sortAscending - Sort the current column in ascending order.
sortDescending - Sort the current column in descending order.
firstPage - Go to the first page.
prevPage - Go to the previous page.
lastPage - Go to the last page.
nextPage - Go to the next page.
While using the Grid in a touch device environment, touch and hold the Grid row cell to show the context menu.
In this demo, Context Menu feature has enabled by defining the
contextMenuItems property with all default items.
Grid component features are segregated into individual feature-wise modules. To use context menu feature, we need to inject
ContextMenu modeule into the