Example of Context Menu in Blazor Gantt Chart Component

Gantt Chart / Miscellaneous / Context Menu

This sample demonstrates the usage of context menu in Gantt component. Context menu allows you to perform quick actions by right clicking anywhere on the Gantt.

In this demo, default context menu items are rendered using EnableContextMenu.

Following items are shown while right click on grid header:

  • AutoFitAll - Auto fit all columns.
  • AutoFit - Auto fit the current column.
  • SortAscending - Sort the current column in ascending order.
  • SortDescending - Sort the current column in descending order.

Following items are shown while right click on both grid and chart content of Gantt:

  • TaskInformation - Edit the current record.
  • DeleteTask - Delete the current record.
  • Save - Save the edited record. It is shown when a cell is in edit mode.
  • Cancel - Cancel the edited state. It is shown when a cell is in edit mode.
  • DeleteDependency - Delete the dependency of the current record.
  • Convert -Convert the normal task into a milestone task and vice versa.
  • Add
    • Above - Add a new row above the selected row
    • Below - Add a new row below the selected row
    • Child - Add a new row as a child to the selected row
    • Milestone - Add a milestone task below to the selected row

You can configure the default and custom menu items in the context menu using the ContextMenuItems property. More information about CRUD operations and managing tasks can be found in this documentation section.

Transform your Blazor web apps today with Syncfusion® Blazor components
100+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE