Example of Context Menu in ASP.NET Core Gantt Chart Control

Gantt Chart
Miscellaneous
Context Menu

This sample demonstrates the various phases involved in constructing a residential house, from testing the soil to handing over the fully constructed property to the owner. This also demonstrates the usage of default and custom context menu in Gantt control.

1
Project initiation
4/2/20244 days0
2
Identify site location
4/2/20240 days30
3
Perform soil test
4/2/20244 days02FS
4
Soil test approval
4/5/20240 days303FS
5
Project estimation
4/8/20246 days15
6
Develop floor plan for estimation
4/8/20243 days304FS
7
List materials
4/11/20243 days06FS
8
Estimation approval
4/15/20240 days07FS
9
Sign contract
4/16/20241 day308FS
10
Project approval and kick off
4/16/20240 days09FS
11
Site work
4/17/20244 days15
12
Clear the building site
4/17/20242 days309FS
13
Install temporary power service
4/19/20242 days012FS
14
Foundation
4/23/202412 days23
15
Excavate for foundations
4/23/20243 days3013FS
16
Dig footer
4/24/20242 days015FF
17
Install plumbing grounds
4/26/20244 days3015FS
18
Pour a foundation and footer with concrete
5/2/20241 day017FS
19
Cure basement walls
5/3/20244 days3018FS
20
Framing
5/9/202412 days20
21
Add load-bearing structure
5/9/20243 days3019FS
22
Install floor joists
5/14/20243 days021FS
23
Add ceiling joists
5/14/20243 days3022SS
24
Install subfloor panels
5/17/20243 days023FS
25
Frame floor walls
5/22/20243 days3024FS
26
Frame floor decking
5/22/20243 days3025SS
27
Exterior finishing
5/27/20249 days15
28
Cover outer walls and roof in OSB
5/27/20243 days3026FS
29
Add water resistive barrier
5/30/20243 days028FS
30
Install roof shingles
6/4/20243 days3029FS
31
Install windows
6/4/20243 days029FS
32
Utilities
5/27/202412 days18
33
Install internal plumbing
5/27/20243 days3026FS
34
Install HVAC
5/30/20243 days033FS
35
Electrical utilities
6/4/20243 days3034FS
36
Natural gas utilities
6/7/20243 days035FS
37
Install bathroom fixtures
6/7/20243 days3035FS
38
Interior finsihing
6/12/202418 days20
39
Install insulation
6/12/20243 days3037FS
40
Install drywall panels
6/17/20243 days039FS
41
Spackle
6/20/20243 days3040FS
42
Apply primer
6/25/20243 days041FS
43
Paint wall and ceilings
6/28/20243 days3042FS
44
Install modular kitchen
7/3/20243 days3043FS
45
Flooring
7/8/20243 days15
46
Tile kitchen, bathroom and entry walls
7/8/20243 days3044FS
47
Tile floor
7/8/20243 days046SS
48
Final acceptance
7/11/20244 days15
49
Final inspection
7/11/20242 days3047FS
50
Cleanup for occupancy
7/15/20242 days049FS
51
Property handover
7/16/20240 days050FS
Project initiation
4
Identify site location
Martin Tamer
Perform soil test
Rose Fuller,Margaret Buchanan,Davolio Fuller
Soil test approval
Project estimation
6
Develop floor plan for estimation
Fuller King
List materials
Fuller King,Jack Davolio
Estimation approval
Construction Supervisor,Davolio Fuller
Sign contract
Construction Supervisor
Project approval and kick off
Site work
4
Clear the building site
Van Jack,Fuller Buchanan
Install temporary power service
Van Jack,Fuller Buchanan
Foundation
12
Excavate for foundations
Rose Fuller,Jack Davolio
Dig footer
Jack Davolio
Install plumbing grounds
Tamer Vinet
Pour a foundation and footer with concrete
Jack Davolio,Tamer Vinet,Vinet Fuller
Cure basement walls
Vinet Fuller
Framing
12
Add load-bearing structure
Fuller King,Davolio Fuller
Install floor joists
Rose Fuller,Margaret Buchanan
Add ceiling joists
Davolio Fuller
Install subfloor panels
Jack Davolio,Tamer Vinet
Frame floor walls
Vinet Fuller
Frame floor decking
Fuller King,Jack Davolio
Exterior finishing
9
Cover outer walls and roof in OSB
Rose Fuller,Jack Davolio
Add water resistive barrier
Martin Tamer,Vinet Fuller
Install roof shingles
Jack Davolio,Tamer Vinet
Install windows
Fuller Buchanan
Utilities
12
Install internal plumbing
Martin Tamer,Vinet Fuller
Install HVAC
Fuller King,Tamer Vinet
Electrical utilities
Natural gas utilities
Bergs Anton
Install bathroom fixtures
Margaret Buchanan,Fuller Buchanan
Interior finsihing
18
Install insulation
Martin Tamer,Jack Davolio
Install drywall panels
Davolio Fuller
Spackle
Vinet Fuller
Apply primer
Vinet Fuller,Bergs Anton
Paint wall and ceilings
Rose Fuller,Tamer Vinet
Install modular kitchen
Davolio Fuller,Fuller Buchanan
Flooring
3
Tile kitchen, bathroom and entry walls
Fuller King,Tamer Vinet,Margaret Buchanan
Tile floor
Rose Fuller,Jack Davolio
Final acceptance
4
Final inspection
Construction Supervisor
Cleanup for occupancy
Martin Tamer,Davolio Fuller
Property handover
Project approval and kick-off
Foundation inspection
Site manager inspection
Property handover and sign-off

Gantt has an option to show the context menu while performing right click on it. You can configure the default and custom menu items in the context menu using the contextMenuItems property. Each menu item will be displayed contextually based on its target. In this demo, we have rendered the following default and custom menu items

Default items:

  • AutoFitAll - Auto fit all columns.
  • AutoFit - Auto fit the current column.
  • TaskInformation - Edit the current record.
  • Indent - Indent the selected record to one level.
  • Outdent - Outdent the selected record to one level.
  • DeleteTask - Delete the current record.
  • Save - Save the edited record.
  • Cancel - Cancel the edited state.
  • SortAscending - Sort the current column in ascending order.
  • SortDescending - Sort the current column in descending order.
  • DeleteDependency - Delete the dependency of the current record.
  • Convert - Convert the normal task into 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 child to the selected row.
    • Milestone - Add a milestone task below to selected row.

Custom items:

In this demo, custom menu items have been enabled in the context menu to perform expanding and collapsing the parent rows,

  • Expand the Row - Used to expand the parent row, and it will render where the row is in a collapsed state.
  • Collapse the Row - Used to collapse the parent row, and it will render where the row is in a expanded state.

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
TRY IT FOR FREE
opens in a new tab