You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/gantt/gantt-tree/data-binding/overview.md
+13-4Lines changed: 13 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -33,19 +33,28 @@ The Blazor Gantt Tree provides various parameters to configure its items. Also c
33
33
34
34
| Parameter | Description |
35
35
| --- | --- |
36
+
|`EndField`| Defines the end date of a task. |
37
+
|`HasChildren`| Whether the item has children. Determines whether an expand arrow is rendered next to the item in an Expandable column. Required when loading data on-demand—if you don't set it to `true`, an expand arrow will not appear and the user will not be able to expand the item and load its children. With hierarchical data, the Gantt Tree will render the icon based on the existence of child items, but `HasChildren` will take precedence. You do not have to set or use its field unless you want to load data on demand or override the arrow for some items. |
38
+
|`Id`| A unique identifier for the item. Required only for binding to flat data. |
36
39
|`Items`| The collection of child items that will be rendered under the current item. Required only when binding to hierarchical data. |
37
-
|`Id`| A unique identifier for the item. |
40
+
38
41
|`ParentId`| Identifies the parent to whom the item belongs. Required only when binding to flat data. All items with the same `ParentId` will be rendered at the same level. For a root level item, `ParentId` needs to be `null`. There needs to be at least one node with a `null` value for the `ParentId`. |
39
-
|`HasChildren`| Whether the item has children. Determines whether an expand arrow is rendered next to the item in an Expandable column. Required for loading data on-demand - if you don't set it to `true`, there will be no expand arrow and so there will be no way for the user to expand the item and load its children. With hierarchical data, the Gantt Tree will render the icon based on the existence of child items, but `HasChildren` will take precedence. You do not have to set or use its field unless you want to load data on demand, or override the arrow for some items. |
42
+
|`PercentCompleteField`| Defines the level of completion of a task in percentages. |
43
+
|`StartField`| Defines the start date of a task. |
44
+
|`TitleField`| Defines whats the title of a task in percentages. |
40
45
41
46
## Data Bindings
42
47
43
48
The properties of a Gantt Tree item match directly to a field of the model the treelist is bound to. Provide that relationship by providing the name of the field from which the corresponding information is to be taken. To do this, in the main `TelerikGantt` tag, use the parameters described below:
Popup editing lets the user click an [Edit command button]({%slug components/grid/columns/command%}) on the row, and a popup shows up with the editable fields associated with a Gantt Task. They can then click the `Save` button in the dialog to submit the changes to the model. This fires the `OnUpdate` event where your code receives the updated model so you can work with the data (for example, to call the appropriate method of your service).
21
21
22
-
In a similar fashion, the `Cancel`,`Delete` command buttons and the `Add` toolbar button fire events to let you handle the data source operations.
22
+
In a similar fashion, the `Cancel` and`Delete` command buttons and the `Add` toolbar button fire events to let you handle the data source operations.
23
23
24
24
You can also cancel the events by setting the `IsCancelled` property of the event arguments to `true`. This lets you prevent the user from editing certain records, inserting or deleting items, based on your application logic.
25
25
26
26
To enable Popup editing in the Gantt Tree, set its `TreeListEditMode` property to `GanttTreeListEditMode.Popup`, then handle the CRUD events as shown in the example below.
27
27
28
+
The popup editing dialog renders up to four tabs that allow you to edit:
29
+
30
+
*`General`—The fields that are used in the [data-binding schema]({%slug gantt-data-binding-overview%}#gantt-tree-item-features).
31
+
*`Other`—The fields that are not included in the [data-binding schema]({%slug gantt-data-binding-overview%}#gantt-tree-item-features) but are present in the bound model.
32
+
*`Predecessor` and `Successor` - render if you have defined [dependencies]({%slug gantt-dependencies-overview%}) in the Gantt component. You can use these tabs as an alternative to the standard [dependency editing]({%slug gantt-dependencies-editing%})
33
+
34
+
## Event Arguments
35
+
36
+
In Telerik UI for Blazor version 4.5.0, the `GanttUpdateEventArgs` received three new collections as fields. They are populated when you define [Dependencies]({%slug gantt-dependencies-overview%}) in the Gantt.
37
+
38
+
| Field | Type | Description |
39
+
|----------|----------|----------|
40
+
|`CreatedDependencies`|`List<GanttDependencyDescriptor>`| A collection of the newly created dependencies. |
41
+
|`UpdatedDependencies`|`List<GanttDependencyDescriptor>`| A collection of the updated dependencies. |
42
+
|`DeletedDependencies`|`List<GanttDependencyDescriptor>`| A collection of the deleted dependencies. |
43
+
44
+
### GanttDependencyDescriptor
45
+
46
+
The `GanttDependencyDescriptor` exposes four fields that describe the mutated dependency:
47
+
48
+
| Field | Type | Description |
49
+
|----------|----------|----------|
50
+
|`PredecessorId`|`object`| The Id of the predecessor of the mutated dependency. |
51
+
|`SuccessorId`|`object`| The Id of the successor of the mutated dependency. |
52
+
|`Type`|`int`| The [Type]({%slug gantt-dependencies-types%}) of the dependency. |
53
+
|`DataItem`|`object`| The model associated with this dependency. |
28
54
29
55
>caption The Command buttons and the Gantt events let you handle data operations in Popup edit mode.
0 commit comments