Skip to content

Commit a7c939d

Browse files
xristianstefanovDimo Dimov
andauthored
[3.2] docs(gantt): Revamped Overview and Gantt Splitter position para… (#880)
* [3.2] docs(gantt): Revamped Overview and Gantt Splitter position parameter added * add auto table layout * add auto table layout 2 * docs(gantt):fixes as per latest comments Co-authored-by: Dimo Dimov <[email protected]>
1 parent 30ea854 commit a7c939d

File tree

10 files changed

+168
-394
lines changed

10 files changed

+168
-394
lines changed

components/gantt/dependencies/databind.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@ To bind a collection of dependencies to the Gantt Chart you should use the `Data
1414

1515
## Gantt Dependencies Features:
1616

17-
* `Data` - `IEnumerable<Object>` - you can pass the collection of dependencies you would like to see rendered to the Data parameter.
18-
19-
* `IdField` - `string` - Unique identifier for each task. You can use it for editing and hierarchy.
20-
21-
* `PredecessorField` - `string` - Points to the predecessor task.
22-
23-
* `SuccessorField` - `string` - Points to the successor task.
17+
@[template](/_contentTemplates/common/parameters-table-styles.md#table-layout)
18+
19+
| Feature | Type | Description |
20+
| --- | --- | --- |
21+
| `Data` | `IEnumerable<Object>` | The collection of dependencies. |
22+
| `IdField` | `string` | Unique identifier for each task. Use it for editing and hierarchy. |
23+
| `PredecessorField` | `string` | Points to the predecessor task. |
24+
| `SuccessorField` | `string` | Points to the successor task. |
2425

2526
>note To use the Data Binding for the Gantt Dependencies you must provide all data binding features listed above.
2627

components/gantt/dependencies/overview.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ The Telerik Gantt for Blazor allows you define dependencies, which are rendered
2121

2222
## Gantt Dependencies Features:
2323

24-
* Data Binding - You can provide a collection of dependencies to the Gantt Chart for Blazor. For more information read the [Data Binding]({%slug gantt-dependencies-databind%}) article.
25-
26-
* `TypeField` - `string` - Defines the dependency type. For more information read the [Types]({%slug gantt-dependencies-types%}) article.
27-
28-
* `Editing` - You can allow the user edit the dependencies. For more information read the [Editing]({%slug gantt-dependencies-editing%}) article.
24+
@[template](/_contentTemplates/common/parameters-table-styles.md#table-layout)
2925

26+
* `Data Binding` - Allows you to provide a collection of dependencies to the Gantt Chart for Blazor. For more information read the [Data Binding]({%slug gantt-dependencies-databind%}) article.
27+
* `TypeField` - Defines the dependency type. For more information read the [Types]({%slug gantt-dependencies-types%}) article.
28+
* `Editing` - Allow the user to edit the dependencies. For more information read the [Editing]({%slug gantt-dependencies-editing%}) article.

components/gantt/events.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ The `OnEdit` event lets you respond to user actions when they want to edit an it
2323

2424
You can read more about the CUD events in the [Gantt Tree Editing Overview]({%slug gantt-tree-editing%}) article.
2525

26+
## TreeListWidthChanged
27+
28+
The `TreeListWidthChanged` event fires as a response to the user changing the width of the TreeList pane in the splitter.
2629

2730
## OnExpand and OnCollapse
2831

components/gantt/gantt-tree/columns/bound.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -127,22 +127,30 @@ You can read more details on how to tie the Gantt to your data fields and child
127127

128128
## Gantt Bound Column Parameters
129129

130-
You can use the following properties on bound columns:
130+
The Blazor Gantt Bound Column provides various parameters to configure the component. Also check the [Gantt public API](https://docs.telerik.com/blazor-ui/api/Telerik.Blazor.Components.TelerikGantt-1).
131131

132132
### Data Binding
133133

134-
* `Expandable` - (defaults to `false`) - when set to true, the column shows an expand/collapse arrow in front of the value and denotes hierarchy be intending it. You should set this to at least one column of your treelist to showcase the hierarchical nature of the data.
135-
* `Field` - (defaults to `null`) - the name of the field in the data source that the column will render as a string (case-sensitive). You can set its as a plain string (`Field="SomeField"`) or to have .NET extract the field name from the model for flat models (`Field=@nameof(MyModelClass.SomeFIeld)`).
134+
@[template](/_contentTemplates/common/parameters-table-styles.md#table-layout)
135+
136+
| Parameter | Type | Description |
137+
| --- | --- | --- |
138+
| `Expandable` | `bool` | When set to true, the column shows an expand/collapse arrow in front of the value and denotes hierarchy be intending it. Set this to at least one column of your treelist to showcase the hierarchical nature of the data. |
139+
| `Field` | `string` | The name of the field in the data source that the column will render as a string (case-sensitive). Set its as a plain string (`Field="SomeField"`) or to have .NET extract the field name from the model for flat models (`Field=@nameof(MyModelClass.SomeFIeld)`). |
136140

137141
### Appearance
138142

139-
* `Title` - the text that is rendered in the column header. See the Notes below for its behavior.
140-
* `DisplayFormat` - the C# format string that is used to render the field value in the cell when the grid is in display mode. Read more in the [Column Display Format]({%slug treelist-columns-displayformat%}) article.
141-
* `TextAlign` - specifies the horizontal alignment of the cell text. For example, you can use this property to right-align numeric columns. The property accepts `ColumnTextAlign` enum values (`Left`, `Right` or `Center`). If not set, the text alignment will depend on existing styles on the page, default browser behavior and the text direction.
142-
* `Width` - (defaults to `null`) - the width of the column. See the [Dimensions]({%slug common-features/dimensions%}) article for information about the supported formats. See [Gantt Column Width Behavior]({%slug gantt-columns-width%}) for detailed information about the Gantt behavior with different column width configurations.
143-
* `MinResizableWidth` - (defaults to `30` and ignores smaller values) - the minimum allowed column width during [user resizing]({%slug gantt-columns-resize%}). Unlike the string `Width` property, this one is decimal and expects pixel values.
144-
* `MaxResizableWidth` - (defaults to `0`) - the maximum allowed column width during [user resizing]({%slug gantt-columns-resize%}). Unlike the string `Width` property, this one is decimal and expects pixel values.
145-
* `Visible` - (defaults to `null`) - if this parameter is set to `false` it hides the column from the Gantt Tree. Accepts both `bool` and `bool?` types, and `null` is treated like `true`.
143+
@[template](/_contentTemplates/common/parameters-table-styles.md#table-layout)
144+
145+
| Parameter | Type and Default Value | Description |
146+
| --- | --- | --- |
147+
| `Title` | `string` | The text that is rendered in the column header. See the Notes below for its behavior. |
148+
| `DisplayFormat` | `string` | The C# format string that is used to render the field value in the cell when the grid is in display mode. Read more in the [Column Display Format]({%slug treelist-columns-displayformat%}) article. |
149+
| `TextAlign` | `ColumnTextAlign` enum <br /> (`Left`) | Specifies the horizontal alignment of the cell text. |
150+
| `Width` | `string` | The width of the column. See the [Dimensions]({%slug common-features/dimensions%}) article for information about the supported formats. See [Gantt Column Width Behavior]({%slug gantt-columns-width%}) for detailed information about the Gantt behavior with different column width configurations. |
151+
| `MinResizableWidth` | `int` <br /> (`30`) | The minimum allowed column width during [user resizing]({%slug gantt-columns-resize%}). Unlike the string `Width` property, this one is decimal and expects pixel values. |
152+
| `MaxResizableWidth` | `int` | The maximum allowed column width during [user resizing]({%slug gantt-columns-resize%}). Unlike the string `Width` property, this one is decimal and expects pixel values. |
153+
| `Visible` | `bool?` <br /> (`null`) | If this parameter is set to `false`, it hides the column from the Gantt Tree. Accepts both `bool` and `bool?` types, and `null` is treated like `true`. |
146154

147155
## Notes
148156

components/gantt/gantt-tree/columns/command.md

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,33 +26,44 @@ In this article:
2626
* [Code Example](#example)
2727

2828

29-
## Features
29+
## Command Column Parameters
3030

31-
This section describes the available features and their use.
31+
The Blazor Gantt Command Column provides various parameters to configure the component. Also check the [Gantt public API](https://docs.telerik.com/blazor-ui/api/Telerik.Blazor.Components.TelerikGantt-1).
3232

3333
### The GanttCommandButton Tag
3434

35-
The `GanttCommandButton` tag offers the following features:
35+
@[template](/_contentTemplates/common/parameters-table-styles.md#table-layout)
3636

37-
* `Command` - the command that will be invoked. Can be one of the built-in commands (see below), or a custom command name.
38-
* `ShowInEdit` - a `boolean` property indicating whether the button is only visible while the user is editing/inserting data.
39-
* `ChildContent` - the text the button will render. You can also place it between the command button's opening and closing tags.
40-
* Appearance properties like `Icon`, `Class`, `Enabled` that are come from the underlying [Button Component features]({%slug components/button/overview%}).
37+
| Parameter | Description |
38+
| --- | --- |
39+
| `Command` | The command to invoke. Can be one of the built-in commands ([see below](#built-in-commands)), or a custom command name. |
40+
| `ShowInEdit` | Defines if the button is visible only when the user is editing or inserting data. |
41+
| `ChildContent` | The text of the button. You can also place it between the command button's opening and closing tags. |
42+
43+
See also Appearance properties like `Icon`, `Class`, `Enabled` that are coming from the underlying [Button Component features]({%slug components/button/overview%}).
4144

4245
### Built-in Commands
4346

44-
There are two built-in commands:
47+
Built-in commands:
48+
49+
@[template](/_contentTemplates/common/parameters-table-styles.md#table-layout)
4550

46-
* `Add` - initiates the creation of a new item. Can apply to rows as well, to create a child element for the current row.
47-
* `Delete` - initiates the deletion of an existing item.
51+
| Command | Description |
52+
| --- | --- |
53+
| `Add` | Initiates the creation of a new item. Can apply to rows as well, to create a child element for the current row. |
54+
| `Delete` | Initiates the deletion of an existing item. |
4855

4956
### OnClick handler
5057

51-
The `OnClick` handler of the commands receives an argument of type `GanttTaskCommandEventArgs` that exposes the following properties:
58+
The `OnClick` handler of the commands receives an argument of type `GanttTaskCommandEventArgs` that exposes the following parameters:
59+
60+
@[template](/_contentTemplates/common/parameters-table-styles.md#table-layout)
5261

53-
* `IsCancelled` - set this to `true` to prevent the operation if the business logic requires it.
54-
* `Item` - the model item of the Gantt row. You can use it to access the model fields and perform the actual data source operations. This property is applicable only for command buttons that are inside a Gantt row, not the toolbar.
55-
* `IsNew` - a boolean field indicating whether the item was just added through the Gantt interface.
62+
| Parameter | Description |
63+
| --- | --- |
64+
| `IsCancelled` | Set this to `true` to prevent the operation if the business logic requires it. |
65+
| `Item` | The model item of the Gantt row. Use it to access the model fields and perform the actual data source operations. This property is applicable only for command buttons that are inside a Gantt row, not the toolbar. |
66+
| `IsNew` | A boolean field indicating whether the item was just added through the Gantt interface. |
5667

5768
>tip For handling CRUD operations we recommend that you use the Gantt events (`OnEdit`, `OnUpdate`, `OnCancel`, `OnCreate`). The `OnClick` handler is available for the built-in commands to provide consistency of the API.
5869

components/gantt/gantt-tree/data-binding/overview.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,20 @@ There are two modes of providing data to a Gantt Tree, and they all use the item
2727

2828
## Gantt Tree Item Features
2929

30-
The Gantt Tree items provide the following features that you can control through the corresponding fields in their data binding:
30+
The Blazor Gantt Tree provides various parameters to configure its items. Also check the [Gantt public API](https://docs.telerik.com/blazor-ui/api/Telerik.Blazor.Components.TelerikGantt-1).
3131

32-
* `Items` - the collection of child items that will be rendered under the current item. Required only when binding to hierarchical data.
32+
@[template](/_contentTemplates/common/parameters-table-styles.md#table-layout)
3333

34-
* `Id` - a unique identifier for the item. Required only for binding to flat data.
35-
36-
* `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` must be `null`. There must be at least one node with a `null` value for the `ParentId`.
37-
38-
* `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.
34+
| Parameter | Description |
35+
| --- | --- |
36+
| `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. Required only for binding to flat data. |
38+
| `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. |
3940

4041
## Data Bindings
4142

42-
The properties of a Gantt Tree item match directly to a field of the model the treelist is bound to. You 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:
43+
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:
4344

4445
* IdField => Id
4546
* ParentIdField => ParentId

components/gantt/gantt-tree/overview.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ position: 0
1010

1111
# Gantt Tree
1212

13-
The Gantt Tree is the left part of the [Gantt Chart]({%slug gantt-overview%}). You can provide data to the component through its [data binding]({%slug gantt-data-binding-overview%}) options. You can also use the [filtering]({%slug gantt-filtering-overview%}), [sorting]({%slug gantt-sorting%}), and [editing]({%slug gantt-tree-editing%}) capabilities of the Telerik Gantt for Blazor.
13+
The Gantt Tree is the left part of the [Gantt Chart]({%slug gantt-overview%}). The component exposes `TreeListWidth` (string, default `30`) parameter for changing the width of the TreeList pane in the splitter.
1414

15-
## List of available features for the Gantt Tree
16-
17-
* `Gantt Columns` - The main building blocks of the Gantt Tree. They are used to render data in the component. You can read more information in the [Bound Column]({%slug gantt-columns-bound%}) article.
15+
Set data to the component through its [data binding]({%slug gantt-data-binding-overview%}) options. You can also use the [filtering]({%slug gantt-filtering-overview%}), [sorting]({%slug gantt-sorting%}), and [editing]({%slug gantt-tree-editing%}) capabilities of the Telerik Gantt for Blazor.
1816

19-
* `Editing` - Allows you to create new records, update the existing or deleting them. You can read more on this topic in the [Editing]({%slug gantt-tree-editing%}) article.
20-
21-
* `Filtering` - the Gantt can filter data automatically. You can read more about this feature in the [Filtering]({%slug gantt-filtering-overview%}) article.
17+
## List of available features for the Gantt Tree
2218

23-
* `Sorting` - Allows you to sort the data in ascending and descending order. You can read more about this feature in the [Sorting]({%slug gantt-sorting%}) article.
19+
@[template](/_contentTemplates/common/parameters-table-styles.md#table-layout)
2420

21+
* `Gantt Columns` - The main building blocks of the Gantt Tree. They are used to render data in the component. Read more information in the [Bound Column]({%slug gantt-columns-bound%}) article.
22+
* `Editing` - Allows you to create new records, update the existing or deleting them. Read more on this topic in the [Editing]({%slug gantt-tree-editing%}) article.
23+
* `Filtering` - The Gantt can filter data automatically. Read more about this feature in the [Filtering]({%slug gantt-filtering-overview%}) article.
24+
* `Sorting` - Allows you to sort the data in ascending and descending order. Read more about this feature in the [Sorting]({%slug gantt-sorting%}) article.

0 commit comments

Comments
 (0)