• Material 3
  • Material 3 Dark
  • Fluent
  • Fluent Dark
  • Bootstrap v5
  • Bootstrap v5 Dark
  • Tailwind CSS
  • Tailwind CSS Dark
  • Material
  • Bootstrap v4
  • High Contrast
Mode Selection
Theme Selection
*Translated by Google Translator.
Essential Studio
All Controls

Example of Default Context Menu in ASP.NET Core Tree Grid Control

This sample demonstrates the usage of context menu in TreeGrid component. Right click anywhere on the TreeGrid to view context menu.


TreeGrid has an option 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 contextMenuItems . Each item will be shown based on its 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.
  • 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.
  • Add Row
    • Above - Add a new row above the selected row
    • Below - Add a new row below the selected row
  • Indent - Indents the record to one level of hierarchy.
  • Outdent - Outdent the record to one level of hierarchy.

In this demo, Context Menu feature has enabled by defining the contextMenuItems property with all default items.

More information on the data binding can be found in this documentation section.

Transform your ASP.NET Core web apps today with Syncfusion ASP.NET Core components
85+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing