This sample demonstrates CRUD operations in Tree Grid using command column. You can perform CRUD operations as follows,
Edit
- To edit record, double click a row or click Edit button from command column after selected a row.Delete
- To delete record, click Delete button from command column after selected a row.Update, Cancel
-You can save or discard changes by click Update and Cancel button from command column respectively.Task ID | Task Name | Start Date | Duration | Progress | Manage Records |
---|---|---|---|---|---|
1 | Planning | 2/3/2017 | 5 | 100 | |
2 | Plan timeline | 2/3/2017 | 5 | 100 | |
3 | Plan budget | 2/3/2017 | 5 | 100 | |
4 | Allocate resources | 2/3/2017 | 5 | 100 | |
5 | Planning complete | 2/7/2017 | 0 | 0 | |
6 | Design | 2/10/2017 | 3 | 86 | |
7 | Software Specification | 2/10/2017 | 3 | 60 | |
8 | Develop prototype | 2/10/2017 | 3 | 100 | |
9 | Get approval from customer | 2/13/2017 | 2 | 100 | |
10 | Design Documentation | 2/13/2017 | 2 | 100 | |
11 | Design complete | 2/14/2017 | 0 | 0 | |
12 | Implementation Phase | 2/17/2017 | 11 | 66 | |
13 | Phase 1 | 2/17/2017 | 11 | 50 | |
14 | Implementation Module 1 | 2/17/2017 | 11 | 10 | |
15 | Development Task 1 | 2/17/2017 | 3 | 50 | |
16 | Development Task 2 | 2/17/2017 | 3 | 50 | |
17 | Testing | 2/20/2017 | 2 | 0 | |
18 | Bug fix | 2/24/2017 | 2 | 0 | |
19 | Customer review meeting | 2/26/2017 | 2 | 0 | |
20 | Phase 1 complete | 2/27/2017 | 0 | 50 | |
21 | Phase 2 | 2/17/2017 | 12 | 60 | |
22 | Implementation Module 2 | 2/17/2017 | 12 | 90 | |
23 | Development Task 1 | 2/17/2017 | 4 | 50 | |
24 | Development Task 2 | 2/17/2017 | 4 | 50 | |
25 | Testing | 2/21/2017 | 2 | 0 | |
26 | Bug fix | 2/25/2017 | 2 | 0 | |
27 | Customer review meeting | 2/27/2017 | 2 | 0 | |
28 | Phase 2 complete | 2/28/2017 | 0 | 50 | |
29 | Phase 3 | 2/17/2017 | 11 | 30 | |
30 | Implementation Module 3 | 2/17/2017 | 11 | 60 | |
31 | Development Task 1 | 2/17/2017 | 3 | 50 | |
32 | Development Task 2 | 2/17/2017 | 3 | 50 | |
33 | Testing | 2/20/2017 | 2 | 0 | |
34 | Bug fix | 2/24/2017 | 2 | 0 | |
35 | Customer review meeting | 2/26/2017 | 2 | 0 | |
36 | Phase 3 complete | 2/27/2017 | 0 | 50 |
The Tree Grid provides an option to render CRUD action buttons in a column by using the CommandColumn feature. The columns->commands property accepts array of CommandModel object. The predefined command button can be defined by using type property. The built-in command button are, Edit Delete Cancel Save Injecting Module: Tree Grid features are segregated into individual feature-wise modules. To use CommandColumn feature, we need to inject Edit module using the TreeGrid.Inject(CommandColumn) method. More information on the command column configuration can be found in this documentation section.