This sample demonstrates CRUD operations in Tree Grid. You can perform CRUD operations as follows,
Task ID | Task Name | Start Date | End Date | Duration | Progress |
---|---|---|---|---|---|
1 | Planning | 2/3/2017 | 2/7/2017 | 5 | 100 |
2 | Plan timeline | 2/3/2017 | 2/7/2017 | 5 | 100 |
3 | Plan budget | 2/3/2017 | 2/7/2017 | 5 | 100 |
4 | Allocate resources | 2/3/2017 | 2/7/2017 | 5 | 100 |
5 | Planning complete | 2/7/2017 | 2/7/2017 | 0 | 0 |
6 | Design | 2/10/2017 | 2/14/2017 | 3 | 86 |
7 | Software Specification | 2/10/2017 | 2/12/2017 | 3 | 60 |
8 | Develop prototype | 2/10/2017 | 2/12/2017 | 3 | 100 |
9 | Get approval from customer | 2/13/2017 | 2/14/2017 | 2 | 100 |
10 | Design Documentation | 2/13/2017 | 2/14/2017 | 2 | 100 |
11 | Design complete | 2/14/2017 | 2/14/2017 | 0 | 0 |
12 | Implementation Phase | 2/17/2017 | 2/27/2017 | 11 | 66 |
The Tree Grid supports CRUD operations. This CRUD operations can be configured in Tree Grid using editSettings
. Also, it has different modes to manipulate the datasource.
The available modes are,
Row
Cell
Dialog
In this demo, Dialog mode is enabled for editing by defining editSettings.mode
as dialog
. You can start editing by double clicking a row or clicking on toolbar's Edit button, then the currently selected row will be shown on a dialog and you can change the row values and save edited data to the datasource.
Injecting Module:
Tree Grid component features are segregated into individual feature-wise modules. To use exporting feature, we need to inject EditService
into the @NgModule.providers
section.
More information on the Tree Grid instantiation can be found in this documentation section.