From 0f8a25de2a0ff50fe1389f6c29df458af6d6f217 Mon Sep 17 00:00:00 2001 From: NansiYancheva Date: Mon, 5 Aug 2024 18:05:22 +0300 Subject: [PATCH 1/2] docs(Gantt): document model types --- .../gantt/gantt-tree/data-binding/overview.md | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/components/gantt/gantt-tree/data-binding/overview.md b/components/gantt/gantt-tree/data-binding/overview.md index b9e535dad2..953bf13386 100644 --- a/components/gantt/gantt-tree/data-binding/overview.md +++ b/components/gantt/gantt-tree/data-binding/overview.md @@ -34,10 +34,10 @@ The Blazor Gantt Tree provides various parameters to configure its items. Also, | Parameter | Description | | --- | --- | | `EndField` | Defines the end date of a task. | -| `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. | -| `Id` | A unique identifier for the item. Required only for binding to flat data. | -| `Items` | The collection of child items that will be rendered under the current item. Required only when binding to hierarchical data. | -| `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`. | +| `HasChildrenField` | 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. | +| `IdField` | A unique identifier for the item. Required only for binding to flat data. | +| `ItemsField` | The collection of child items that will be rendered under the current item. Required only when binding to hierarchical data. | +| `ParentIdField` | 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`. | | `PercentCompleteField` | Defines the level of completion of a task in percentages. | | `StartField` | Defines the start date of a task. | | `TitleField` | Defines what's the title of a task in percentages. | @@ -46,14 +46,16 @@ The Blazor Gantt Tree provides various parameters to configure its items. Also, 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: -* EndField => End -* HasChildrenField => HasChildren -* IdField => Id -* ItemsField => Items -* ParentIdField => ParentId -* PercentCompleteField => PercentComplete -* StartField => Start -* TitleField => Title +| Model Field Name | Model Field Type | Gantt Parameter | +| --- | --- | --- | +| End | `DateTime` | `EndField` | +| HasChildren | `bool` | `HasChildrenField` | +| Id | `object` | `IdField`| +| Items | `IEnumerable` | `ItemsField` | +| ParentId | `object` | `ParentIdField` | +| PercentComplete | `double` | `PercentCompleteField` | +| Start | `DateTime` | `StartField` | +| Title | `string` | `TitleField` | ## Notes From cba5d142465e6739d96f80ea18d3017bb5658451 Mon Sep 17 00:00:00 2001 From: Dimo Dimov <961014+dimodi@users.noreply.github.com> Date: Wed, 7 Aug 2024 11:34:05 +0300 Subject: [PATCH 2/2] Update components/gantt/gantt-tree/data-binding/overview.md Co-authored-by: Iva Stefanova Koevska-Atanasova --- components/gantt/gantt-tree/data-binding/overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/gantt/gantt-tree/data-binding/overview.md b/components/gantt/gantt-tree/data-binding/overview.md index 953bf13386..53db09344b 100644 --- a/components/gantt/gantt-tree/data-binding/overview.md +++ b/components/gantt/gantt-tree/data-binding/overview.md @@ -34,7 +34,7 @@ The Blazor Gantt Tree provides various parameters to configure its items. Also, | Parameter | Description | | --- | --- | | `EndField` | Defines the end date of a task. | -| `HasChildrenField` | 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. | +| `HasChildrenField` | 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. | | `IdField` | A unique identifier for the item. Required only for binding to flat data. | | `ItemsField` | The collection of child items that will be rendered under the current item. Required only when binding to hierarchical data. | | `ParentIdField` | 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`. |