Grids
Example of Custom Context Menu in ASP.NET Core Tree Grid Control
This sample demonstrates the usage of custom context menu in TreeGrid component. Right click anywhere on a parent row in the TreeGrid to view custom context menu.
Task ID | Task Name | Start Date | Duration | Progress | Priority |
---|---|---|---|---|---|
1 | Planning | 3/2/2017 | 5 | 100 | Normal |
2 | Plan timeline | 3/2/2017 | 5 | 100 | Normal |
3 | Plan budget | 3/2/2017 | 5 | 100 | Low |
4 | Allocate resources | 3/2/2017 | 5 | 100 | Critical |
5 | Planning complete | 7/2/2017 | 1 | 1 | Low |
6 | Design | 10/2/2017 | 3 | 86 | High |
7 | Software Specification | 10/2/2017 | 3 | 60 | Normal |
8 | Develop prototype | 10/2/2017 | 3 | 100 | Critical |
9 | Get approval from customer | 2/13/2017 | 2 | 100 | Low |
10 | Design complete | 2/14/2017 | 1 | 1 | Normal |
TreeGrid has an option to show the custom context menu when right click on it. To configure the custom items in context menu, you should define custom item in contextMenuItems
.
In this demo, Custom Context Menu feature has enabled by defining the custom context menu Expand the Row
and Collapse the Row
for the parent nodes in contextMenuItems
property.