diff --git a/blazor/accumulation-chart/annotation.md b/blazor/accumulation-chart/annotation.md
index 3b1b9f2583..3d5e8fab7f 100644
--- a/blazor/accumulation-chart/annotation.md
+++ b/blazor/accumulation-chart/annotation.md
@@ -152,6 +152,6 @@ N> Refer to the [Blazor Charts](https://www.syncfusion.com/blazor-components/bla
## See also
-* [Data Label](./data-labels)
+* [Data Label](./data-label)
* [Tooltip](./tool-tip)
* [Legend](./legend)
\ No newline at end of file
diff --git a/blazor/accumulation-chart/chart-print.md b/blazor/accumulation-chart/chart-print.md
index 74e2e87fab..41d5736d9a 100644
--- a/blazor/accumulation-chart/chart-print.md
+++ b/blazor/accumulation-chart/chart-print.md
@@ -242,6 +242,6 @@ N> Refer to the [Blazor Charts](https://www.syncfusion.com/blazor-components/bla
## See also
-* [Data Label](./data-labels)
+* [Data Label](./data-label)
* [Tooltip](./tool-tip)
* [Legend](./legend)
\ No newline at end of file
diff --git a/blazor/accumulation-chart/grouping.md b/blazor/accumulation-chart/grouping.md
index 38036d3108..a600d07bda 100644
--- a/blazor/accumulation-chart/grouping.md
+++ b/blazor/accumulation-chart/grouping.md
@@ -168,6 +168,6 @@ The points that have been grouped together will appear as a single slice with th
N> Refer to the [Blazor Charts](https://www.syncfusion.com/blazor-components/blazor-charts) feature tour page for its groundbreaking feature representations and also explore the [Blazor Accumulation Chart Example](https://blazor.syncfusion.com/demos/chart/pie?theme=bootstrap5) to know various features of accumulation charts and how it is used to represent numeric proportional data.
-* [Data Label](./data-labels)
+* [Data Label](./data-label)
* [Tooltip](./tool-tip)
* [Legend](./legend)
\ No newline at end of file
diff --git a/blazor/chart/accessibility.md b/blazor/chart/accessibility.md
index 8e7fb93972..c7b54f88ca 100644
--- a/blazor/chart/accessibility.md
+++ b/blazor/chart/accessibility.md
@@ -92,5 +92,5 @@ The accessibility compliance of the Blazor Chart component is shown in the follo
* [Accessibility in Syncfusion® Blazor components](https://blazor.syncfusion.com/documentation/common/accessibility)
-* [Accessibility Customization in Syncfusion® Blazor components](./advanced-accessibility-configuration.md)
+* [Accessibility Customization in Syncfusion® Blazor components](./advanced-accessibility-configuration)
diff --git a/blazor/datagrid/column-rendering.md b/blazor/datagrid/column-rendering.md
index e48c0e7fef..693c2207c0 100644
--- a/blazor/datagrid/column-rendering.md
+++ b/blazor/datagrid/column-rendering.md
@@ -582,7 +582,7 @@ In the below example, we have used the `Expand` query to load the nested Employe
### Complex data generation using ExpandoObject
-Before proceeding this, learn about [ExpandoObject Binding](https://blazor.syncfusion.com/documentation/datagrid/data-binding#expandoobject-binding). You can achieve ExpandoObject complex data binding in the Grid by using the dot(.) operator in the column.field. In the following examples, `CustomerID.Name` and `ShipCountry.Country` are complex data.
+Before proceeding this, learn about [ExpandoObject Binding](https://blazor.syncfusion.com/documentation/datagrid/data-binding/local-data#expandoobject-binding). You can achieve ExpandoObject complex data binding in the Grid by using the dot(.) operator in the column.field. In the following examples, `CustomerID.Name` and `ShipCountry.Country` are complex data.
{% tabs %}
{% highlight razor tabtitle="Index.razor" %}
@@ -635,7 +635,7 @@ Before proceeding this, learn about [ExpandoObject Binding](https://blazor.syncf
### Complex data generation using DynamicObject
-Before proceeding this, learn about [DynamicObject Binding](https://blazor.syncfusion.com/documentation/datagrid/data-binding#dynamicobject-binding). You can achieve DynamicObject complex data binding in the Grid by using the dot(.) operator in the column.field. In the following examples, `CustomerID.Name` and `ShipCountry.Country` are complex data.
+Before proceeding this, learn about [DynamicObject Binding](https://blazor.syncfusion.com/documentation/datagrid/data-binding/local-data#dynamicobject-binding). You can achieve DynamicObject complex data binding in the Grid by using the dot(.) operator in the column.field. In the following examples, `CustomerID.Name` and `ShipCountry.Country` are complex data.
{% tabs %}
{% highlight razor tabtitle="Index.razor" %}
diff --git a/blazor/gantt-chart/accessibility.md b/blazor/gantt-chart/accessibility.md
index 0d2772e804..6e83cf71d5 100644
--- a/blazor/gantt-chart/accessibility.md
+++ b/blazor/gantt-chart/accessibility.md
@@ -1,7 +1,7 @@
---
layout: post
title: Accessibility in Blazor Gantt Chart Component | Syncfusion
-description: Checkout and learn here all about Accessibility in Syncfusion Blazor Gantt Chart component and more.
+description: Learn about accessibility features in the Syncfusion Blazor Gantt Chart component, including WCAG 2.2, Section 508, and keyboard navigation support.
platform: Blazor
control: Gantt Chart
documentation: ug
@@ -11,18 +11,20 @@ documentation: ug
The Syncfusion Blazor Gantt Chart component adheres to accessibility guidelines, including [ADA](https://www.ada.gov/), [Section 508](https://www.section508.gov/), [WCAG 2.2](https://www.w3.org/TR/WCAG22/), and [WCAG roles](https://www.w3.org/TR/wai-aria/#roles) standards, ensuring compatibility with assistive technologies, including those relying on assistive technologies.
-The accessibility compliance for the Blazor Gantt component is outlined below.
+## Accessibility Compliance
+
+The table below summarizes the accessibility compliance of the Blazor Gantt Chart component.
| Accessibility Criteria | Compatibility |
-| -- | -- |
-| [WCAG 2.2 Support](../common/accessibility#accessibility-standards) | |
-| [Section 508 Support](../common/accessibility#accessibility-standards) | |
-| [Screen Reader Support](../common/accessibility#screen-reader-support) | |
-| [Right-To-Left Support](../common/accessibility#right-to-left-support) | |
-| [Color Contrast](../common/accessibility#color-contrast) | |
-| [Mobile Device Support](../common/accessibility#mobile-device-support) | |
-| [Keyboard Navigation Support](../common/accessibility#keyboard-navigation-support) | |
-| [Axe-core Accessibility Validation](../common/accessibility#ensuring-accessibility) | |
+|------------------------|---------------|
+| [WCAG 2.2 Support](../common/accessibility#accessibility-standards) | |
+| [Section 508 Support](../common/accessibility#accessibility-standards) | |
+| [Screen Reader Support](../common/accessibility#screen-reader-support) | |
+| [Right-To-Left Support](../common/accessibility#right-to-left-support) | |
+| [Color Contrast](../common/accessibility#color-contrast) | |
+| [Mobile Device Support](../common/accessibility#mobile-device-support) | |
+| [Keyboard Navigation Support](../common/accessibility#keyboard-navigation-support) | |
+| [Axe-core Accessibility Validation](../common/accessibility#ensuring-accessibility) | |
-
- All features of the component meet the requirement.
-
-
- Some features of the component do not meet the requirement.
-
-
- The component does not meet the requirement.
-
-## WAI-ARIA
+
- All features meet the requirement.
+
- Some features do not fully meet the requirement.
+
- The component does not meet the requirement.
-The Blazor Gantt component implements [WAI-ARIA](https://www.w3.org/WAI/ARIA/apg/patterns/) patterns to enhance accessibility. The following ARIA attributes are applied:
+## WAI-ARIA attributes
-The following ARIA attributes are used in Blazor Gantt:
+The Blazor Gantt Chart component implements [WAI-ARIA](https://www.w3.org/WAI/ARIA/apg/patterns/) patterns to enhance accessibility. The following ARIA attributes are applied:
| Attributes | Description |
|------------|-------------|
@@ -58,48 +56,48 @@ The following ARIA attributes are used in Blazor Gantt:
## Keyboard navigation
-The Gantt component follows the [keyboard interaction](https://www.w3.org/WAI/ARIA/apg/patterns/) guideline, ensuring accessibility for users of assistive technologies (AT) and those who rely solely on keyboard navigation. The following keyboard shortcuts are supported by the Gantt component:
+The Blazor Gantt Chart component supports comprehensive [keyboard interaction](https://www.w3.org/WAI/ARIA/apg/patterns/) for users relying on keyboards or assistive technologies. Below are the supported keyboard shortcuts, organized by functionality.
### Focus elements
-| Windows | MAC | Actions |
-| ----- | ----- | ----- |
-| Alt + J | ⌥ + J | Moves the focus to the entire gantt chart. |
-| Home | Fn + ← | Moves the focus to the first cell of the focused row. |
-| End | Fn + → | Moves the focus to the last cell of the focused row. |
-| Ctrl + Home | ⌘ + Fn + ← | Moves the focus to the first Cell of the first row in the gantt chart. |
-| Ctrl + End | ⌘ + Fn + → | Moves the focus to the last Cell of the last row in the gantt chart. |
-| ↑ | ↑ | Moves the cell focus upward from the focused cell. |
-| ↓ | ↓ | Moves the cell focus downward from the focused cell. |
-| → | → | Moves the cell focus right side from the focused cell. |
-| ← | ← | Moves the cell focus left side from the focused cell. |
-| Alt + W | ⌥ + W | Moves the focus to the gantt content element. |
+| Windows | Mac | Action |
+|---------|-----|--------|
+| Alt + J | ⌥ + J | Focuses the entire Gantt chart. |
+| Home | Fn + ← | Moves focus to the first cell of the current row. |
+| End | Fn + → | Moves focus to the last cell of the current row. |
+| Ctrl + Home | ⌘ + Fn + ← | Moves focus to the first cell of the first row. |
+| Ctrl + End | ⌘ + Fn + → | Moves focus to the last cell of the last row. |
+| ↑ | ↑ | Moves focus to the cell above the current cell. |
+| ↓ | ↓ | Moves focus to the cell below the current cell. |
+| → | → | Moves focus to the cell to the right. |
+| ← | ← | Moves focus to the cell to the left. |
+| Alt + W | ⌥ + W | Focuses the Gantt content element. |
### Expand/Collapse
-| Windows | MAC | Actions |
-| ----- | ----- | ----- |
+| Windows | Mac | Action |
+|---------|-----|--------|
| Ctrl + ↓ | ⌘ + ↓ | Expands all tasks. |
| Ctrl + ↑ | ⌘ + ↑ | Collapses all tasks. |
-| Ctrl + Shift + ↑ | ⌘ + ⇧ + ↑ | Collapse the selected row. |
-| Ctrl + Shift + ↓ | ⌘ + ⇧ + ← | Expands the selected row. |
+| Ctrl + Shift + ↑ | ⌘ + ⇧ + ↑ | Collapses the selected row. |
+| Ctrl + Shift + ↓ | ⌘ + ⇧ + ↓ | Expands the selected row. |
### Selection
-| Windows | MAC | Actions |
-| ----- | ----- | ----- |
-| ↑ | ↑ | Moves up a row/cell selection from the selected row/cell. |
-| ↓ | ↓ | Moves down a row/cell selection from the selected row/cell. |
-| → | → | Moves to the right cell selection from the selected cell. |
-| ← | ← | Moves to the left cell selection from the selected cell. |
-| Shift + ↑ | ⇧ + ↑ | Extends the row/cell selection upwards from the selected row/cell. |
-| Shift + ↓ | ⇧ + ↓ | Extends the row/cell selection downwards from the selected row/cell. |
-| Shift + → | ⇧ + → | Extends the cell selection to the right side from the selected cell. |
-| Shift + ← | ⇧ + ← | Extends the cell selection to the left side from the selected cell. |
-| Enter | Enter | Moves the row/cell selection downward from the selected cell/row. |
-| Shift + Enter | ⇧ + Enter | Moves the row/cell selection upward. |
-| Esc | Esc | Deselects all the selected row/cells. |
-| Ctrl + A | ⌘ + A | Select all the row/cells in the current page. |
+| Windows | Mac | Action |
+|---------|-----|--------|
+| ↑ | ↑ | Selects the row or cell above the current selection. |
+| ↓ | ↓ | Selects the row or cell below the current selection. |
+| → | → | Selects the cell to the right of the current selection. |
+| ← | ← | Selects the cell to the left of the current selection. |
+| Shift + ↑ | ⇧ + ↑ | Extends selection upward. |
+| Shift + ↓ | ⇧ + ↓ | Extends selection downward. |
+| Shift + → | ⇧ + → | Extends cell selection to the right. |
+| Shift + ← | ⇧ + ← | Extends cell selection to the left. |
+| Enter | Enter | Selects the row or cell below the current selection. |
+| Shift + Enter | ⇧ + Enter | Selects the row or cell above the current selection. |
+| Esc | Esc | Clears all selections. |
+| Ctrl + A | ⌘ + A | Selects all rows or cells on the current page. |
### Clipboard
@@ -110,79 +108,79 @@ The Gantt component follows the [keyboard interaction](https://www.w3.org/WAI/AR
### Context menu
-| Windows | MAC | Actions |
-| ----- | ----- | ----- |
-| Esc | Esc | Closes the opened sub menu. |
-| Enter | Enter | Selects the focused item. |
-| Up | Up | Navigates up or to the previous menu item. |
-| Down | Down | Navigates down or to the next menu item. |
-| Left | Left | Close the current sub menu and navigates to the parent menu. |
-| Right | Right | Navigates and open the next sub menu. |
+| Windows | Mac | Action |
+|---------|-----|--------|
+| Esc | Esc | Closes the context menu. |
+| Enter | Enter | Selects the focused menu item. |
+| ↑ | ↑ | Navigates to the previous menu item. |
+| ↓ | ↓ | Navigates to the next menu item. |
+| ← | ← | Closes the current submenu and navigates to the parent menu. |
+| → | → | Opens the next submenu. |
### Cell editing
-| Windows | MAC | Actions |
-| ----- | ----- | ----- |
-| F2 | F2 | Starts editing of selected Row/cell. |
-| Enter | Enter | Saves current cell. |
-| Insert | ⌘ + Enter | Creates a new add form based on the new row position. |
-| Delete | Delete | Deletes the current selected record. |
-| Tab | Tab | Navigates to the next editable cell, saves the current cell, and starts editing the next cell. |
-| Shift + Tab | ⇧ + Tab | Navigates to the previous editable cell, saves the current cell, and starts editing the previous cell. |
-| Shift + Enter | ⇧ + Enter | Saves the current cell and starts editing the previous row cell. |
+| Windows | Mac | Action |
+|---------|-----|--------|
+| F2 | F2 | Initiates editing of the selected row or cell. |
+| Enter | Enter | Saves the current cell. |
+| Insert | ⌘ + Enter | Opens a form to add a new row. |
+| Delete | Delete | Deletes the selected record. |
+| Tab | Tab | Saves the current cell and moves to the next editable cell. |
+| Shift + Tab | ⇧ + Tab | Saves the current cell and moves to the previous editable cell. |
+| Shift + Enter | ⇧ + Enter | Saves the current cell and edits the cell in the previous row. |
### Filtering
-| Windows | MAC | Actions |
-| ----- | ----- | ----- |
-| Alt + ↓ | ⌥ + ↓ | Opens the filter menu when its header element is in focused state. |
+| Windows | Mac | Action |
+|---------|-----|--------|
+| Alt + ↓ | ⌥ + ↓ | Opens the filter menu for the focused header. |
### Column Menu
-| Windows | MAC | Actions |
-| ----- | ----- | ----- |
-| Alt + ↓ | ⌥ + ↓ | Opens column menu when its header element is in focused state. |
+| Windows | Mac | Action |
+|---------|-----|--------|
+| Alt + ↓ | ⌥ + ↓ | Opens the column menu for the focused header. |
### Reordering
-| Windows | MAC | Actions |
-| ----- | ----- | ----- |
-| Ctrl + ← / → | ⌘ + ← / → | Reorders the focused header column to the left or right side. |
+| Windows | Mac | Action |
+|---------|-----|--------|
+| Ctrl + ← / → | ⌘ + ← / → | Moves the focused column to the left or right. |
### Sorting
-| Windows | MAC | Actions |
-| ----- | ----- | ----- |
-| Enter | Enter | Performs sorting(ascending/descending) on a column when its header element is in focused state. |
-| Ctrl + Enter | ⌘ + Enter | Performs multi-sorting on a column when its header element is in focused state. |
-| Shift + Enter | ⇧ + Enter | Clears sorting for the focused header column. |
+| Windows | Mac | Action |
+|---------|-----|--------|
+| Enter | Enter | Sorts the focused column (ascending or descending). |
+| Ctrl + Enter | ⌘ + Enter | Applies multi-column sorting. |
+| Shift + Enter | ⇧ + Enter | Clears sorting for the focused column. |
### Toolbar
-| Windows | MAC | Actions |
-| ----- | ----- | ----- |
-| ← | ← | Focuses the previous element. |
-| → | → | Focuses the next element. |
-| Enter | Enter | Performs the focused toolbar element action. |
+| Windows | Mac | Action |
+|---------|-----|--------|
+| ← | ← | Focuses the previous toolbar element. |
+| → | → | Focuses the next toolbar element. |
+| Enter | Enter | Activates the focused toolbar element. |
### Tooltip
-| Windows | MAC | Actions |
-| ----- | ----- | ----- |
-| Escape | Escape | Closes or dismisses the tooltip. |
-| Tab | Tab | A form control receiving focus (say through tab key), opens the tooltip, and on focus out closes it. |
+| Windows | Mac | Action |
+|---------|-----|--------|
+| Esc | Esc | Closes the tooltip. |
+| Tab | Tab | Opens the tooltip on focus and closes it on focus out. |
### Dialog editing
-| Windows | MAC | Actions |
-| ----- | ----- | ----- |
-| Ctrl + Insert | ⌘ + Insert | Opens the add row dialog popup. |
-| Ctrl + F2 | ⌘ + F2 | Opens the edit row dialog popup. |
-| Del | Del | Deletes the currently selected record. |
+| Windows | Mac | Action |
+|---------|-----|--------|
+| Ctrl + Insert | ⌘ + Insert | Opens the add row dialog. |
+| Ctrl + F2 | ⌘ + F2 | Opens the edit row dialog. |
+| Del | Del | Deletes the selected record. |
| Enter | Enter | Saves the current row. |
| Esc | Esc | Closes the dialog. |
-| Tab | Tab | Navigates to the next editable cell, saves the current cell, and starts editing the next cell in the dialog elements. |
-| Shift + Tab | ⇧ + Tab | Navigates to the previous editable cell, saves the current cell, and starts editing the previous cell in the dialog elements. |
+| Tab | Tab | Saves the current cell and moves to the next editable cell in the dialog. |
+| Shift + Tab | ⇧ + Tab | Saves the current cell and moves to the previous editable cell in the dialog. |
## Validate Accessibility Compliance
diff --git a/blazor/gantt-chart/cell-selection.md b/blazor/gantt-chart/cell-selection.md
index 484e6b0311..4e5fec6e44 100644
--- a/blazor/gantt-chart/cell-selection.md
+++ b/blazor/gantt-chart/cell-selection.md
@@ -13,7 +13,7 @@ Cell selection in the Gantt Chart component enables interactive selection of spe
## Single cell selection
-Single cell selection in the Gantt chart is enabled by setting [GanttSelectionSettings.Mode](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttSelectionSettings.html#Syncfusion_Blazor_Gantt_GanttSelectionSettings_Mode) to **Cell** and [selectionSettings.type](https://ej2.syncfusion.com/angular/documentation/api/gantt/selectionSettings/#type) to **Single**. This allows selecting only one cell at a time.
+Single cell selection in the Gantt chart is enabled by setting [GanttSelectionSettings.Mode](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttSelectionSettings.html#Syncfusion_Blazor_Gantt_GanttSelectionSettings_Mode) to **Cell** and [GanttSelectionSettings.Type](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttSelectionSettings.html#Syncfusion_Blazor_Gantt_GanttSelectionSettings_Type) to **Single**. This allows selecting only one cell at a time.
{% tabs %}
{% highlight razor tabtitle="Index.razor" %}
@@ -70,7 +70,7 @@ Single cell selection in the Gantt chart is enabled by setting [GanttSelectionSe
## Multiple cell selection
-Multiple cell selection in the Gantt Chart is enabled by setting [selectionSettings.mode](https://ej2.syncfusion.com/angular/documentation/api/gantt/selectionSettings/#mode) to **Cell** and [selectionSettings.type](https://ej2.syncfusion.com/angular/documentation/api/gantt/selectionSettings/#type) to **Multiple**. This allows selecting multiple cells at a time by holding the Ctrl key while clicking on each desired cell.
+Multiple cell selection in the Gantt Chart is enabled by setting [GanttSelectionSettings.Mode](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttSelectionSettings.html#Syncfusion_Blazor_Gantt_GanttSelectionSettings_Mode) to **Cell** and [GanttSelectionSettings.Type](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttSelectionSettings.html#Syncfusion_Blazor_Gantt_GanttSelectionSettings_Type) to **Multiple**. This allows selecting multiple cells at a time by holding the Ctrl key while clicking on each desired cell.
{% tabs %}
{% highlight razor tabtitle="Index.razor" %}
@@ -194,7 +194,7 @@ Select a specific cell in the Gantt Chart by calling the [SelectCellAsync](http
## Customize cell selection action
-You may customize cell selection behavior in the Gantt Chart using [cellSelecting](https://ej2.syncfusion.com/angular/documentation/api/gantt/events/#cellselecting), [cellSelected](https://ej2.syncfusion.com/angular/documentation/api/gantt/events/#cellselected), [cellDeselecting](https://ej2.syncfusion.com/angular/documentation/api/gantt/events/#celldeselecting), and [cellDeselected](https://ej2.syncfusion.com/angular/documentation/api/gantt/events/#celldeselected) events.
+You may customize cell selection behavior in the Gantt Chart using [CellSelecting](https://blazor.syncfusion.com/documentation/gantt-chart/events#cellselecting), [CellSelected](https://blazor.syncfusion.com/documentation/gantt-chart/events#cellselected), [CellDeselecting](https://blazor.syncfusion.com/documentation/gantt-chart/events#celldeselecting), and [CellDeselected](https://blazor.syncfusion.com/documentation/gantt-chart/events#celldeselected) events.
The following sample demonstrates selection is canceled in the `cellSelecting` event when the **TaskName** is **Perform Soil test**.
@@ -301,4 +301,4 @@ The following sample demonstrates selection is canceled in the `cellSelecting` e
- [Accessibility in Blazor Gantt Chart](https://blazor.syncfusion.com/documentation/gantt-chart/accessibility)
- [Blazor Gantt Chart Feature Tour](https://www.syncfusion.com/blazor-components/blazor-gantt-chart)
-- [Blazor Gantt Chart Example](https://blazor.syncfusion.com/demos/gantt-chart/default-functionalities?theme=bootstrap5)
+- [Blazor Gantt Chart Example](https://blazor.syncfusion.com/demos/gantt-chart/default-functionalities?theme=bootstrap5)
\ No newline at end of file
diff --git a/blazor/gantt-chart/clipboard.md b/blazor/gantt-chart/clipboard.md
index 754326d571..fd27008e05 100644
--- a/blazor/gantt-chart/clipboard.md
+++ b/blazor/gantt-chart/clipboard.md
@@ -9,20 +9,22 @@ documentation: ug
# Clipboard in Blazor Gantt Chart component
-The clipboard provides an option to copy selected rows or cell data into the clipboard.
+The clipboard feature allows copying selected row or cell data from the Gantt Chart component.
-The following list of keyboard shortcuts is supported in the Gantt Chart to copy selected rows or cells data into the clipboard.
+The following keyboard shortcut is supported for clipboard operations:
Interaction keys |Description
-----|-----
Ctrl + C |Copy selected rows or cells data into clipboard.
+Ctrl + Shift + H |Copy selected rows or cells data with header into clipboard.
-```cshtml
+{% tabs %}
+{% highlight razor tabtitle="Index.razor" %}
@using Syncfusion.Blazor.Gantt
-
+
@@ -35,44 +37,50 @@ Interaction keys |Description
public class TaskData
{
- public int TaskId { get; set; }
+ public int TaskID { get; set; }
public string TaskName { get; set; }
public DateTime StartDate { get; set; }
public DateTime? EndDate { get; set; }
public string Duration { get; set; }
public int Progress { get; set; }
public string Predecessor { get; set; }
- public int? ParentId { get; set; }
+ public int? ParentID { get; set; }
}
public static List GetTaskCollection()
{
List Tasks = new List()
{
- new TaskData() { TaskId = 1, TaskName = "Project initiation", StartDate = new DateTime(2019, 04, 05), EndDate = new DateTime(2019, 04, 21), },
- new TaskData() { TaskId = 2, TaskName = "Identify Site location", StartDate = new DateTime(2019, 04, 05), Duration = "0", Progress = 30, ParentId = 1 },
- new TaskData() { TaskId = 3, TaskName = "Perform soil test", StartDate = new DateTime(2019, 04, 05), Duration = "4", Progress = 40, Predecessor = "2", ParentId = 1 },
- new TaskData() { TaskId = 4, TaskName = "Soil test approval", StartDate = new DateTime(2019, 04, 05), Duration = "0", Progress = 30, Predecessor = "3", ParentId = 1 },
- new TaskData() { TaskId = 5, TaskName = "Project estimation", StartDate = new DateTime(2019, 04, 06), EndDate = new DateTime(2019, 04, 21) },
- new TaskData() { TaskId = 6, TaskName = "Develop floor plan for estimation", StartDate = new DateTime(2019, 04, 06), Duration = "3", Progress = 30, Predecessor = "4" , ParentId = 5 },
- new TaskData() { TaskId = 7, TaskName = "List materials", StartDate = new DateTime(2019, 04, 06), Duration = "3", Progress = 40, Predecessor = "6" , ParentId = 5 },
- new TaskData() { TaskId = 8, TaskName = "Estimation approval", StartDate = new DateTime(2019, 04, 06), Duration = "0", Progress = 30, Predecessor = "7" , ParentId = 5 },
+ new TaskData() { TaskID = 1, TaskName = "Project initiation", StartDate = new DateTime(2019, 04, 05), EndDate = new DateTime(2019, 04, 10), },
+ new TaskData() { TaskID = 2, TaskName = "Identify Site location", StartDate = new DateTime(2019, 04, 05), Duration = "0", Progress = 30, ParentID = 1 },
+ new TaskData() { TaskID = 3, TaskName = "Perform soil test", StartDate = new DateTime(2019, 04, 05), Duration = "4", Progress = 40, Predecessor = "2", ParentID = 1 },
+ new TaskData() { TaskID = 4, TaskName = "Soil test approval", StartDate = new DateTime(2019, 04, 05), Duration = "0", Progress = 30, Predecessor = "3", ParentID = 1 },
+ new TaskData() { TaskID = 5, TaskName = "Project estimation", StartDate = new DateTime(2019, 04, 06), EndDate = new DateTime(2019, 04, 18) },
+ new TaskData() { TaskID = 6, TaskName = "Develop floor plan for estimation", StartDate = new DateTime(2019, 04, 06), Duration = "3", Progress = 30, Predecessor = "4" , ParentID = 5 },
+ new TaskData() { TaskID = 7, TaskName = "List materials", StartDate = new DateTime(2019, 04, 06), Duration = "3", Progress = 40, Predecessor = "6" , ParentID = 5 },
+ new TaskData() { TaskID = 8, TaskName = "Estimation approval", StartDate = new DateTime(2019, 04, 06), Duration = "0", Progress = 30, Predecessor = "7" , ParentID = 5 },
};
return Tasks;
}
}
-```
+
+{% endhighlight %}
+{% endtabs %}
+
+{% previewsample "https://blazorplayground.syncfusion.com/embed/rNBSNEVJgLymNZrA?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
## Copy to clipboard by external buttons
-To copy the data of the selected rows or cells into the clipboard with the help of external buttons, invoke the [CopyAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_CopyAsync) method.
+To copy selected rows or cells to the clipboard using external buttons, invoke the [CopyAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_CopyAsync) method.
-```cshtml
+{% tabs %}
+{% highlight razor tabtitle="Index.razor" %}
@using Syncfusion.Blazor.Gantt
@using Syncfusion.Blazor.Navigations
+
-
+
@@ -81,9 +89,11 @@ To copy the data of the selected rows or cells into the clipboard with the help
+
@code{
private List TaskCollection { get; set; }
private SfGantt GanttObject;
+
protected override void OnInitialized()
{
this.TaskCollection = GetTaskCollection();
@@ -102,61 +112,68 @@ To copy the data of the selected rows or cells into the clipboard with the help
await this.GanttObject.CopyAsync(WithHeader);
}
}
+
public class TaskData
{
- public int TaskId { get; set; }
+ public int TaskID { get; set; }
public string TaskName { get; set; }
public DateTime StartDate { get; set; }
public DateTime? EndDate { get; set; }
public string Duration { get; set; }
public int Progress { get; set; }
public string Predecessor { get; set; }
- public int? ParentId { get; set; }
+ public int? ParentID { get; set; }
}
public static List GetTaskCollection()
{
List Tasks = new List()
{
- new TaskData() { TaskId = 1, TaskName = "Project initiation", StartDate = new DateTime(2019, 04, 05), EndDate = new DateTime(2019, 04, 21), },
- new TaskData() { TaskId = 2, TaskName = "Identify Site location", StartDate = new DateTime(2019, 04, 05), Duration = "0", Progress = 30, ParentId = 1 },
- new TaskData() { TaskId = 3, TaskName = "Perform soil test", StartDate = new DateTime(2019, 04, 05), Duration = "4", Progress = 40, Predecessor = "2", ParentId = 1 },
- new TaskData() { TaskId = 4, TaskName = "Soil test approval", StartDate = new DateTime(2019, 04, 05), Duration = "0", Progress = 30, Predecessor = "3", ParentId = 1 },
- new TaskData() { TaskId = 5, TaskName = "Project estimation", StartDate = new DateTime(2019, 04, 06), EndDate = new DateTime(2019, 04, 21) },
- new TaskData() { TaskId = 6, TaskName = "Develop floor plan for estimation", StartDate = new DateTime(2019, 04, 06), Duration = "3", Progress = 30, Predecessor = "4" , ParentId = 5 },
- new TaskData() { TaskId = 7, TaskName = "List materials", StartDate = new DateTime(2019, 04, 06), Duration = "3", Progress = 40, Predecessor = "6" , ParentId = 5 },
- new TaskData() { TaskId = 8, TaskName = "Estimation approval", StartDate = new DateTime(2019, 04, 06), Duration = "0", Progress = 30, Predecessor = "7" , ParentId = 5 },
+ new TaskData() { TaskID = 1, TaskName = "Project initiation", StartDate = new DateTime(2019, 04, 05), EndDate = new DateTime(2019, 04, 10), },
+ new TaskData() { TaskID = 2, TaskName = "Identify Site location", StartDate = new DateTime(2019, 04, 05), Duration = "0", Progress = 30, ParentID = 1 },
+ new TaskData() { TaskID = 3, TaskName = "Perform soil test", StartDate = new DateTime(2019, 04, 05), Duration = "4", Progress = 40, Predecessor = "2", ParentID = 1 },
+ new TaskData() { TaskID = 4, TaskName = "Soil test approval", StartDate = new DateTime(2019, 04, 05), Duration = "0", Progress = 30, Predecessor = "3", ParentID = 1 },
+ new TaskData() { TaskID = 5, TaskName = "Project estimation", StartDate = new DateTime(2019, 04, 06), EndDate = new DateTime(2019, 04, 18) },
+ new TaskData() { TaskID = 6, TaskName = "Develop floor plan for estimation", StartDate = new DateTime(2019, 04, 06), Duration = "3", Progress = 30, Predecessor = "4" , ParentID = 5 },
+ new TaskData() { TaskID = 7, TaskName = "List materials", StartDate = new DateTime(2019, 04, 06), Duration = "3", Progress = 40, Predecessor = "6" , ParentID = 5 },
+ new TaskData() { TaskID = 8, TaskName = "Estimation approval", StartDate = new DateTime(2019, 04, 06), Duration = "0", Progress = 30, Predecessor = "7" , ParentID = 5 },
};
return Tasks;
}
}
-```
+
+{% endhighlight %}
+{% endtabs %}
+
+{% previewsample "https://blazorplayground.syncfusion.com/embed/VXhIDOBJqrnnaTje?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
## Copy hierarchy modes
-Gantt Chart provides support for a set of copy modes with the [CopyHierarchyMode](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.CopyHierarchyType.html) property. The following are the type of filter modes available in the Gantt Chart.
+The Gantt Chart component supports multiple copy modes using the [CopyHierarchyMode](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.CopyHierarchyType.html) property. The following modes are available:
-* **Parent**: This is the default copy hierarchy mode in the Gantt Chart. The clipboard value will have the selected records with its parent records, if the selected records do not have any parent record, then the selected record will be in the clipboard.
+- **Parent**: Copies selected records along with their parent records. If no parent exists, only the selected records are copied.
-* **Child**: Clipboard value will have the selected records with its child record. If the selected records do not have any child record, then the selected records will be in the clipboard.
+- **Child**: Copies selected records along with their child records. If no child exists, only the selected records are copied.
-* **Both**: Clipboard value will have the selected records with both parent and child records. If the selected records do not have any parent and child records, then the selected records alone are copied to the clipboard.
+- **Both**: Copies selected records with both parent and child records. If neither exists, only the selected records are copied.
-* **None**: Only the selected records will be in the clipboard.
+- **None**: Copies only the selected records without any hierarchy.
+
+{% tabs %}
+{% highlight razor tabtitle="Index.razor" %}
-```cshtml
@using Syncfusion.Blazor.Gantt
@using Syncfusion.Blazor.TreeGrid
@using Syncfusion.Blazor.Navigations
@using Syncfusion.Blazor.DropDowns;
-
+
-
+
@@ -164,6 +181,7 @@ Gantt Chart provides support for a set of copy modes with the [CopyHierarchyMode
+
@code{
private List TaskCollection { get; set; }
private SfGantt GanttObject;
@@ -175,6 +193,7 @@ Gantt Chart provides support for a set of copy modes with the [CopyHierarchyMode
public string Id { get; set; }
public string Mode { get; set; }
}
+
protected override void OnInitialized()
{
this.TaskCollection = GetTaskCollection();
@@ -217,50 +236,60 @@ Gantt Chart provides support for a set of copy modes with the [CopyHierarchyMode
await this.GanttObject.CopyAsync(WithHeader);
}
}
+
public class TaskData
{
- public int TaskId { get; set; }
+ public int TaskID { get; set; }
public string TaskName { get; set; }
public DateTime StartDate { get; set; }
public DateTime? EndDate { get; set; }
public string Duration { get; set; }
public int Progress { get; set; }
public string Predecessor { get; set; }
- public int? ParentId { get; set; }
+ public int? ParentID { get; set; }
}
public static List GetTaskCollection()
{
List Tasks = new List()
{
- new TaskData() { TaskId = 1, TaskName = "Project initiation", StartDate = new DateTime(2019, 04, 05), EndDate = new DateTime(2019, 04, 21), },
- new TaskData() { TaskId = 2, TaskName = "Identify Site location", StartDate = new DateTime(2019, 04, 05), Duration = "0", Progress = 30, ParentId = 1 },
- new TaskData() { TaskId = 3, TaskName = "Perform soil test", StartDate = new DateTime(2019, 04, 05), Duration = "4", Progress = 40, Predecessor = "2", ParentId = 1 },
- new TaskData() { TaskId = 4, TaskName = "Soil test approval", StartDate = new DateTime(2019, 04, 05), Duration = "0", Progress = 30, Predecessor = "3", ParentId = 1 },
- new TaskData() { TaskId = 5, TaskName = "Project estimation", StartDate = new DateTime(2019, 04, 06), EndDate = new DateTime(2019, 04, 21) },
- new TaskData() { TaskId = 6, TaskName = "Develop floor plan for estimation", StartDate = new DateTime(2019, 04, 06), Duration = "3", Progress = 30, Predecessor = "4" , ParentId = 5 },
- new TaskData() { TaskId = 7, TaskName = "List materials", StartDate = new DateTime(2019, 04, 06), Duration = "3", Progress = 40, Predecessor = "6" , ParentId = 5 },
- new TaskData() { TaskId = 8, TaskName = "Estimation approval", StartDate = new DateTime(2019, 04, 06), Duration = "0", Progress = 30, Predecessor = "7" , ParentId = 5 },
+ new TaskData() { TaskID = 1, TaskName = "Project initiation", StartDate = new DateTime(2019, 04, 05), EndDate = new DateTime(2019, 04, 10), },
+ new TaskData() { TaskID = 2, TaskName = "Identify Site location", StartDate = new DateTime(2019, 04, 05), Duration = "0", Progress = 30, ParentID = 1 },
+ new TaskData() { TaskID = 3, TaskName = "Perform soil test", StartDate = new DateTime(2019, 04, 05), Duration = "4", Progress = 40, Predecessor = "2", ParentID = 1 },
+ new TaskData() { TaskID = 4, TaskName = "Soil test approval", StartDate = new DateTime(2019, 04, 05), Duration = "0", Progress = 30, Predecessor = "3", ParentID = 1 },
+ new TaskData() { TaskID = 5, TaskName = "Project estimation", StartDate = new DateTime(2019, 04, 06), EndDate = new DateTime(2019, 04, 18) },
+ new TaskData() { TaskID = 6, TaskName = "Develop floor plan for estimation", StartDate = new DateTime(2019, 04, 06), Duration = "3", Progress = 30, Predecessor = "4" , ParentID = 5 },
+ new TaskData() { TaskID = 7, TaskName = "List materials", StartDate = new DateTime(2019, 04, 06), Duration = "3", Progress = 40, Predecessor = "6" , ParentID = 5 },
+ new TaskData() { TaskID = 8, TaskName = "Estimation approval", StartDate = new DateTime(2019, 04, 06), Duration = "0", Progress = 30, Predecessor = "7" , ParentID = 5 },
};
return Tasks;
}
}
-```
+
+{% endhighlight %}
+{% endtabs %}
+
+{% previewsample "https://blazorplayground.syncfusion.com/embed/rtreZYhfgVwQdJtr?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
## Paste
-The content of a row/cells can be copied by selecting the rows/cells and pressing the Ctrl + C shortcut key to copy data and paste it by pressing Ctrl + V shortcut key.
+You can copy the content of a row or cell by selecting it and pressing the Ctrl + C shortcut key. To paste the copied data, press Ctrl + V.
+
+**Selected row copy and paste:**
-In the following code example, selected rows are copied by using the [BeforeCopy](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttEvents-1.html#Syncfusion_Blazor_Gantt_GanttEvents_1_BeforeCopy) event and pasted by using the [AddRecordAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_AddRecordAsync__0_System_Nullable_System_Double__System_Nullable_Syncfusion_Blazor_Gantt_RowPosition__) method and by binding keyboard events `onkeyup`.
+You can use the [RowSelected](https://blazor.syncfusion.com/documentation/gantt-chart/events#rowselected) event, which captures the index of the active row. When a copy command is triggered (`Ctrl + C`), the [BeforeCopy](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttEvents-1.html#Syncfusion_Blazor_Gantt_GanttEvents_1_BeforeCopy) event processes the selected row data and prepares it for duplication. The paste operation is initiated through the `onkeyup` keyboard event (`Ctrl + V`) and handled using the [AddRecordAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_AddRecordAsync__0_System_Nullable_System_Double__System_Nullable_Syncfusion_Blazor_Gantt_RowPosition__) method, which inserts the copied records above the selected row. To prevent unintended paste actions, the [RowDeselected](https://blazor.syncfusion.com/documentation/gantt-chart/events#rowdeselected) event resets the selection index when no row is active.
+
+{% tabs %}
+{% highlight razor tabtitle="Index.razor" %}
-```cshtml
@using Syncfusion.Blazor.Gantt
@using Syncfusion.Blazor.Grids
+
-
+
-
+
@@ -271,6 +300,7 @@ In the following code example, selected rows are copied by using the [BeforeCopy
private List TaskCollection { get; set; }
public List CopiedRecords { get; set; } = new List();
public double SelectedIndex { get; set; }
+
public void RowDeselect(RowDeselectEventArgs Args)
{
SelectedIndex = -1;
@@ -287,7 +317,7 @@ In the following code example, selected rows are copied by using the [BeforeCopy
{
var colVal = rec.Split("\t");
int colIndex = 0;
- int id = TaskCollection.Max(a => a.TaskId) + 1;
+ int id = TaskCollection.Max(a => a.TaskID) + 1;
TaskData ganttData = new TaskData() { };
foreach (var col in columns)
{
@@ -295,18 +325,14 @@ In the following code example, selected rows are copied by using the [BeforeCopy
{
ganttData.GetType().GetProperty(col.Field).SetValue(ganttData, id + index);
}
- else if (col.Type == ColumnType.Date)
+ else if (col.Type == Syncfusion.Blazor.Grids.ColumnType.Date)
{
ganttData.GetType().GetProperty(col.Field).SetValue(ganttData, Convert.ToDateTime(colVal[colIndex]));
}
- else if (col.Type == ColumnType.String)
+ else if (col.Type == Syncfusion.Blazor.Grids.ColumnType.String)
{
ganttData.GetType().GetProperty(col.Field).SetValue(ganttData, colVal[colIndex]);
}
- else if (col.Type == ColumnType.Number)
- {
- ganttData.GetType().GetProperty(col.Field).SetValue(ganttData, Convert.ToInt32(colVal[colIndex]));
- }
colIndex++;
}
index++;
@@ -314,23 +340,26 @@ In the following code example, selected rows are copied by using the [BeforeCopy
}
}
}
+
public void RowSelect(RowSelectEventArgs Args)
{
SelectedIndex = Args.RowIndex;
}
+
protected override void OnInitialized()
{
this.TaskCollection = GetTaskCollection();
}
+
private async Task KeyUp(KeyboardEventArgs Args)
{
if (Args.CtrlKey && Args.Code == "KeyV" && CopiedRecords.Count > 0 && SelectedIndex > -1)
{
- var parentID = TaskCollection[(int)SelectedIndex].ParentId;
+ var parentID = TaskCollection[(int)SelectedIndex].ParentID;
for (var i = 0; i < CopiedRecords.Count; i++)
{
- CopiedRecords[i].ParentId = parentID;
- GanttChart.AddRecordAsync(CopiedRecords[i],(int)SelectedIndex, RowPosition.Above);
+ CopiedRecords[i].ParentID = parentID;
+ GanttChart.AddRecordAsync(CopiedRecords[i],(int)SelectedIndex, Syncfusion.Blazor.Gantt.RowPosition.Above);
}
CopiedRecords = new List();
}
@@ -338,50 +367,57 @@ In the following code example, selected rows are copied by using the [BeforeCopy
public class TaskData
{
- public int TaskId { get; set; }
+ public int TaskID { get; set; }
public string TaskName { get; set; }
public DateTime StartDate { get; set; }
public DateTime? EndDate { get; set; }
public string Duration { get; set; }
public int Progress { get; set; }
- public int? ParentId { get; set; }
+ public int? ParentID { get; set; }
}
public static List GetTaskCollection()
{
List Tasks = new List() {
- new TaskData() { TaskId = 1, TaskName = "Project initiation", StartDate = new DateTime(2022, 04, 05), EndDate = new
- DateTime(2022, 04, 21) },
- new TaskData() { TaskId = 2, TaskName = "Identify Site location", StartDate = new DateTime(2022, 04, 05), Duration =
- "0", Progress = 30, ParentId = 1 },
- new TaskData() { TaskId = 3, TaskName = "Perform soil test", StartDate = new DateTime(2022, 04, 05), Duration = "4",
- Progress = 40, ParentId = 1 },
- new TaskData() { TaskId = 4, TaskName = "Soil test approval", StartDate = new DateTime(2022, 04, 05), Duration = "0",
- Progress = 30, ParentId = 1 },
- new TaskData() { TaskId = 5, TaskName = "Project estimation", StartDate = new DateTime(2022, 04, 06), EndDate = new
- DateTime(2022, 04, 21) },
- new TaskData() { TaskId = 6, TaskName = "Develop floor plan for estimation", StartDate = new DateTime(2022, 04, 06),
- Duration = "3", Progress = 30, ParentId = 5 },
- new TaskData() { TaskId = 7, TaskName = "List materials", StartDate = new DateTime(2022, 04, 06), Duration = "3",
- Progress = 40, ParentId = 5 },
- new TaskData() { TaskId = 8, TaskName = "Estimation approval", StartDate = new DateTime(2022, 04, 06), Duration = "0",
- Progress = 30, ParentId = 5 }
+ new TaskData() { TaskID = 1, TaskName = "Project initiation", StartDate = new DateTime(2022, 04, 05), EndDate = new
+ DateTime(2022, 04, 08) },
+ new TaskData() { TaskID = 2, TaskName = "Identify Site location", StartDate = new DateTime(2022, 04, 05), Duration =
+ "0", Progress = 30, ParentID = 1 },
+ new TaskData() { TaskID = 3, TaskName = "Perform soil test", StartDate = new DateTime(2022, 04, 05), Duration = "4",
+ Progress = 40, ParentID = 1 },
+ new TaskData() { TaskID = 4, TaskName = "Soil test approval", StartDate = new DateTime(2022, 04, 05), Duration = "0",
+ Progress = 30, ParentID = 1 },
+ new TaskData() { TaskID = 5, TaskName = "Project estimation", StartDate = new DateTime(2022, 04, 06), EndDate = new
+ DateTime(2022, 04, 08) },
+ new TaskData() { TaskID = 6, TaskName = "Develop floor plan for estimation", StartDate = new DateTime(2022, 04, 06),
+ Duration = "3", Progress = 30, ParentID = 5 },
+ new TaskData() { TaskID = 7, TaskName = "List materials", StartDate = new DateTime(2022, 04, 06), Duration = "3",
+ Progress = 40, ParentID = 5 },
+ new TaskData() { TaskID = 8, TaskName = "Estimation approval", StartDate = new DateTime(2022, 04, 06), Duration = "0",
+ Progress = 30, ParentID = 5 }
};
return Tasks;
}
}
-```
-
-In the following code example, selected cells are copied and pasted by using the [UpdateRecordByIDAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_UpdateRecordByIDAsync__0_) method and by binding keyboard events `onkeydown` and `onkeyup.`
+{% endhighlight %}
+{% endtabs %}
+
+{% previewsample "https://blazorplayground.syncfusion.com/embed/VNLoXOLIWYbFyAtl?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
+
+**Selected Cell Copy and Paste:**
+
+You can use the [CellSelected](https://blazor.syncfusion.com/documentation/gantt-chart/events#cellselected) event to identify the active row when a cell is selected. When the copy command (`Ctrl + C`) is triggered, the selected cell positions are captured using `GetSelectedRowCellIndexesAsync`. On paste (`Ctrl + V`), the copied values are applied to the corresponding cells in the target rows using the [UpdateRecordByIDAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_UpdateRecordByIDAsync__0_) method. The copy and paste actions are handled through `onkeydown` and `onkeyup` keyboard events. To avoid unintended updates, the [CellDeselected](https://blazor.syncfusion.com/documentation/gantt-chart/events#celldeselected) event resets the selection index when no cell is active.
+
+{% tabs %}
+{% highlight razor tabtitle="Index.razor" %}
-```cshtml
@using Syncfusion.Blazor.Gantt
@using Syncfusion.Blazor.Grids
-
+
-
+
@@ -457,70 +493,73 @@ In the following code example, selected cells are copied and pasted by using the
public class TaskData
{
- public int TaskId { get; set; }
+ public int TaskID { get; set; }
public string TaskName { get; set; }
public DateTime StartDate { get; set; }
public DateTime? EndDate { get; set; }
public string Duration { get; set; }
public int Progress { get; set; }
- public int? ParentId { get; set; }
+ public int? ParentID { get; set; }
}
public static List GetTaskCollection()
{
List Tasks = new List() {
- new TaskData() { TaskId = 1, TaskName = "Project initiation", StartDate = new DateTime(2022, 04, 05), EndDate = new
- DateTime(2022, 04, 21) },
- new TaskData() { TaskId = 2, TaskName = "Identify Site location", StartDate = new DateTime(2022, 04, 05), Duration =
- "0", Progress = 30, ParentId = 1 },
- new TaskData() { TaskId = 3, TaskName = "Perform soil test", StartDate = new DateTime(2022, 04, 05), Duration = "4",
- Progress = 40, ParentId = 1 },
- new TaskData() { TaskId = 4, TaskName = "Soil test approval", StartDate = new DateTime(2022, 04, 05), Duration = "0",
- Progress = 30, ParentId = 1 },
- new TaskData() { TaskId = 5, TaskName = "Project estimation", StartDate = new DateTime(2022, 04, 06), EndDate = new
- DateTime(2022, 04, 21) },
- new TaskData() { TaskId = 6, TaskName = "Develop floor plan for estimation", StartDate = new DateTime(2022, 04, 06),
- Duration = "3", Progress = 30, ParentId = 5 },
- new TaskData() { TaskId = 7, TaskName = "List materials", StartDate = new DateTime(2022, 04, 06), Duration = "3",
- Progress = 40, ParentId = 5 },
- new TaskData() { TaskId = 8, TaskName = "Estimation approval", StartDate = new DateTime(2022, 04, 06), Duration = "0",
- Progress = 30, ParentId = 5 }
+ new TaskData() { TaskID = 1, TaskName = "Project initiation", StartDate = new DateTime(2022, 04, 05), EndDate = new
+ DateTime(2022, 04, 08) },
+ new TaskData() { TaskID = 2, TaskName = "Identify Site location", StartDate = new DateTime(2022, 04, 05), Duration =
+ "0", Progress = 30, ParentID = 1 },
+ new TaskData() { TaskID = 3, TaskName = "Perform soil test", StartDate = new DateTime(2022, 04, 05), Duration = "4",
+ Progress = 40, ParentID = 1 },
+ new TaskData() { TaskID = 4, TaskName = "Soil test approval", StartDate = new DateTime(2022, 04, 05), Duration = "0",
+ Progress = 30, ParentID = 1 },
+ new TaskData() { TaskID = 5, TaskName = "Project estimation", StartDate = new DateTime(2022, 04, 06), EndDate = new
+ DateTime(2022, 04, 08) },
+ new TaskData() { TaskID = 6, TaskName = "Develop floor plan for estimation", StartDate = new DateTime(2022, 04, 06),
+ Duration = "3", Progress = 30, ParentID = 5 },
+ new TaskData() { TaskID = 7, TaskName = "List materials", StartDate = new DateTime(2022, 04, 06), Duration = "3",
+ Progress = 40, ParentID = 5 },
+ new TaskData() { TaskID = 8, TaskName = "Estimation approval", StartDate = new DateTime(2022, 04, 06), Duration = "0",
+ Progress = 30, ParentID = 5 }
};
return Tasks;
}
}
-```
-
-## Autofill functionality in Gantt Chart
+{% endhighlight %}
+{% endtabs %}
-To achieve the autofill functionality in the Gantt chart, the drag selection feature must be enabled, and the keyup event must be bound.
+{% previewsample "https://blazorplayground.syncfusion.com/embed/htheZYBSrtNqqEsO?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
+
+## Autofill
+
+To achieve the autofill functionality in the Gantt chart, the drag selection feature must be enabled, and the `keyup` event must be bound.
The following properties have been configured in the [GanttSelectionSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttSelectionSettings.html) to enable the drag selection feature:
-- [AllowDragSelection](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttSelectionSettings.html#Syncfusion_Blazor_Gantt_GanttSelectionSettings_AllowDragSelection): `true`
+- [AllowDragSelection](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttSelectionSettings.html#Syncfusion_Blazor_Gantt_GanttSelectionSettings_AllowDragSelection): **true**
- [Mode](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttSelectionSettings.html#Syncfusion_Blazor_Gantt_GanttSelectionSettings_Mode): [Cell](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.SelectionMode.html#Syncfusion_Blazor_Grids_SelectionMode_Cell)
- [Type](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttSelectionSettings.html#Syncfusion_Blazor_Gantt_GanttSelectionSettings_Type): [Multiple](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.SelectionType.html#Syncfusion_Blazor_Grids_SelectionType_Multiple)
- [CellSelectionMode](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttSelectionSettings.html#Syncfusion_Blazor_Gantt_GanttSelectionSettings_CellSelectionMode): [Box](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.CellSelectionMode.html#Syncfusion_Blazor_Grids_CellSelectionMode_Box)
-Using these settings, the user can select multiple cells in the Gantt chart by dragging the mouse.
+These settings allow users to select multiple cells by dragging the mouse.
-Then the native keyup event is bound to the Gantt chart in order to customize the keydown actions in the gantt chart. In the example provided, the Alt key is captured to fill the data while dragging the selection. For more information, please refer to this [page](https://blazor.syncfusion.com/documentation/gantt-chart/how-to/bind-native-events).
+The `keyup` event is used to detect key actions. For more information, please refer to this [page](https://blazor.syncfusion.com/documentation/gantt-chart/how-to/bind-native-events). In this example, pressing the `Alt` key triggers autofill. The value of the first selected cell is captured during the `CellSelected` event based on the selected cell index.
-The value of first selected cell is captured in the [CellSelectedEvent](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttEvents-1.html#Syncfusion_Blazor_Gantt_GanttEvents_1_CellSelected) based on the cell index.
+When the `Alt` key is released during a multi-cell selection, the [UpdateRecordByID](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_UpdateRecordByIDAsync__0_) method is called in the `keyup` event. This updates all selected rows by copying the value from the first selected cell to the corresponding cells in other rows.
-When the `Alt` key is pressed and released during a multiple cell selection, the [UpdateRecordByID](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_UpdateRecordByIDAsync__0_) method is called in the Keyup event. This method updates the values of all selected rows with the value of the first selected cell, effectively copying the value of the first selected cell to all other cells in those rows that were selected.
+This customization enables users to quickly update multiple cells, improving data entry efficiency in the Gantt chart.
-With this customization, users can easily and quickly update multiple cells in the Gantt chart, improving overall efficiency.
+{% tabs %}
+{% highlight razor tabtitle="Index.razor" %}
-```cshtml
@using Syncfusion.Blazor.Gantt
@using Syncfusion.Blazor.Grids
-
+
-
+
@@ -574,31 +613,33 @@ With this customization, users can easily and quickly update multiple cells in t
public class TaskData
{
- public int TaskId { get; set; }
+ public int TaskID { get; set; }
public string TaskName { get; set; }
public DateTime StartDate { get; set; }
public DateTime? EndDate { get; set; }
public string Duration { get; set; }
public int Progress { get; set; }
- public int? ParentId { get; set; }
+ public int? ParentID { get; set; }
}
public static List GetTaskCollection()
{
List Tasks = new List()
{
- new TaskData() { TaskId = 1, TaskName = "Project initiation", StartDate = new DateTime(2022, 04, 05), EndDate = new DateTime(2022, 04, 21), },
- new TaskData() { TaskId = 2, TaskName = "Identify Site location", StartDate = new DateTime(2022, 04, 05), Duration = "0", Progress = 30, ParentId = 1 },
- new TaskData() { TaskId = 3, TaskName = "Perform soil test", StartDate = new DateTime(2022, 04, 05), Duration = "4", Progress = 40, ParentId = 1 },
- new TaskData() { TaskId = 4, TaskName = "Soil test approval", StartDate = new DateTime(2022, 04, 05), Duration = "0", Progress = 30, ParentId = 1 },
- new TaskData() { TaskId = 5, TaskName = "Project estimation", StartDate = new DateTime(2022, 04, 06), EndDate = new DateTime(2022, 04, 21), },
- new TaskData() { TaskId = 6, TaskName = "Develop floor plan for estimation", StartDate = new DateTime(2022, 04, 06), Duration = "3", Progress = 30, ParentId = 5 },
- new TaskData() { TaskId = 7, TaskName = "List materials", StartDate = new DateTime(2022, 04, 06), Duration = "3", Progress = 40, ParentId = 5 },
- new TaskData() { TaskId = 8, TaskName = "Estimation approval", StartDate = new DateTime(2022, 04, 06), Duration = "0", Progress = 30, ParentId = 5 },
+ new TaskData() { TaskID = 1, TaskName = "Project initiation", StartDate = new DateTime(2022, 04, 05), EndDate = new DateTime(2022, 04, 08), },
+ new TaskData() { TaskID = 2, TaskName = "Identify Site location", StartDate = new DateTime(2022, 04, 05), Duration = "0", Progress = 30, ParentID = 1 },
+ new TaskData() { TaskID = 3, TaskName = "Perform soil test", StartDate = new DateTime(2022, 04, 05), Duration = "4", Progress = 40, ParentID = 1 },
+ new TaskData() { TaskID = 4, TaskName = "Soil test approval", StartDate = new DateTime(2022, 04, 05), Duration = "0", Progress = 30, ParentID = 1 },
+ new TaskData() { TaskID = 5, TaskName = "Project estimation", StartDate = new DateTime(2022, 04, 06), EndDate = new DateTime(2022, 04, 08), },
+ new TaskData() { TaskID = 6, TaskName = "Develop floor plan for estimation", StartDate = new DateTime(2022, 04, 06), Duration = "3", Progress = 30, ParentID = 5 },
+ new TaskData() { TaskID = 7, TaskName = "List materials", StartDate = new DateTime(2022, 04, 06), Duration = "3", Progress = 40, ParentID = 5 },
+ new TaskData() { TaskID = 8, TaskName = "Estimation approval", StartDate = new DateTime(2022, 04, 06), Duration = "0", Progress = 30, ParentID = 5 },
};
return Tasks;
}
}
-```
-
+{% endhighlight %}
+{% endtabs %}
+
+{% previewsample "https://blazorplayground.syncfusion.com/embed/VDVyXaBShXqAcAGK?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
\ No newline at end of file
diff --git a/blazor/gantt-chart/column-menu.md b/blazor/gantt-chart/column-menu.md
index ce716d4f85..a66b0a72ee 100644
--- a/blazor/gantt-chart/column-menu.md
+++ b/blazor/gantt-chart/column-menu.md
@@ -9,22 +9,20 @@ documentation: ug
# Column Menu in Blazor Gantt Chart Component
-The column menu feature in the Syncfusion Blazor Gantt Chart enables sorting, filtering, and autofit options through a menu accessed by clicking a column's icon. Enable it by setting the [ShowColumnMenu](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_ShowColumnMenu) property to `true`. This guide covers enabling and using the column menu.
+The column menu in the Blazor Gantt component offers built-in actions including sorting, filtering, column chooser, and autofit. It appears when the column header icon is clicked.
-## Column Menu
+To enable this feature, set [ShowColumnMenu](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_ShowColumnMenu) to **true** in the Gantt configuration. Also enable [AllowSorting](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_AllowSorting), [AllowFiltering](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_AllowFiltering), and [AllowResizing](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_AllowResizing) to support the corresponding actions.
-Enable the column menu by setting `ShowColumnMenu` to `true`, along with [AllowSorting](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_AllowSorting), [AllowFiltering](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_AllowFiltering), and [AllowResizing](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_AllowResizing) for respective features. Clicking the column header icon displays a menu with options based on the column type.
-
-The default menu items are:
+The following built-in column menu items are available:
| Item | Description |
|------|-------------|
-| `Sort Ascending` | Sort the current column in ascending order. |
-| `Sort Descending` | Sort the current column in descending order. |
-| `Auto Fit` | Auto fit the current column. |
-| `Auto Fit All` | Auto fit all columns. |
-| `Column Chooser` | Choose column visibility. |
-| `Filter` | Show the filter menu based on column type. |
+| Sort Ascending | Sort the current column in ascending order. |
+| Sort Descending | Sort the current column in descending order. |
+| Auto Fit | Auto fit the current column. |
+| Auto Fit All | Auto fit all columns. |
+| Column Chooser | Choose column visibility. |
+| Filter | Displays filtering options based on [FilterSettings.FilterType](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttFilterSettings.html#Syncfusion_Blazor_Gantt_GanttFilterSettings_FilterType). |
{% tabs %}
{% highlight razor tabtitle="Index.razor" %}
@@ -76,7 +74,7 @@ The default menu items are:
{% previewsample "https://blazorplayground.syncfusion.com/embed/BjVoMXiticGodFzW?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
-> **Note**: Disable the column menu for a specific column by setting [GanttColumn.ShowColumnMenu](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_ShowColumnMenu) to `false`.
+> **Note**: Disable the column menu for a specific column by setting [GanttColumn.ShowColumnMenu](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_ShowColumnMenu) to **false**.
## See also
diff --git a/blazor/gantt-chart/column-reordering.md b/blazor/gantt-chart/column-reordering.md
index 57fea462cb..25d17ab0e5 100644
--- a/blazor/gantt-chart/column-reordering.md
+++ b/blazor/gantt-chart/column-reordering.md
@@ -145,4 +145,4 @@ The following demonstrates how to reorder columns by placing **Progress** before
{% endhighlight %}
{% endtabs %}
-{% previewsample "https://blazorplayground.syncfusion.com/embed/BtLoMtsgBGsnpvOD?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
+{% previewsample "https://blazorplayground.syncfusion.com/embed/BtLoMtsgBGsnpvOD?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
\ No newline at end of file
diff --git a/blazor/gantt-chart/column-resizing.md b/blazor/gantt-chart/column-resizing.md
index 6b9cc72129..442cbf8921 100644
--- a/blazor/gantt-chart/column-resizing.md
+++ b/blazor/gantt-chart/column-resizing.md
@@ -146,4 +146,4 @@ The screenshot below illustrates column resizing on a touch device.

-> You can refer to our [Blazor Gantt Chart](https://www.syncfusion.com/blazor-components/blazor-gantt-chart) feature tour page for its groundbreaking feature representations. You can also explore our [Blazor Gantt Chart example](https://blazor.syncfusion.com/demos/gantt-chart/default-functionalities?theme=bootstrap4) to know how to render and configure the Gantt Chart.
+> You can refer to our [Blazor Gantt Chart](https://www.syncfusion.com/blazor-components/blazor-gantt-chart) feature tour page for its groundbreaking feature representations. You can also explore our [Blazor Gantt Chart example](https://blazor.syncfusion.com/demos/gantt-chart/default-functionalities?theme=bootstrap4) to know how to render and configure the Gantt Chart.
\ No newline at end of file
diff --git a/blazor/gantt-chart/column-template.md b/blazor/gantt-chart/column-template.md
index 9d25ff0e1c..773007ec3c 100644
--- a/blazor/gantt-chart/column-template.md
+++ b/blazor/gantt-chart/column-template.md
@@ -7,11 +7,15 @@ control: Gantt Chart
documentation: ug
---
-# Column template in Blazor Gantt Chart Component
+# Column template in Blazor Gantt Chart component
-A column template is used to customize the column’s look. The following code example explains how to define the custom template in Gantt Chart using the `Template` property.
+The Syncfusion® Blazor Gantt Chart component supports column templates, allowing custom content to be displayed in a column instead of the default field value. You can render custom components or HTML elements using the [Template](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_Template) property to include elements such as images, buttons, or other UI controls within a column.
-N> The column template feature is used to render the customized element value in the UI for a particular column. The data operations like filtering, sorting, etc., will not work based on the column template values. It will be handled based on the values you have provided to the particular column in the datasource.
+> When using template columns, they are primarily meant for rendering custom content and may not provide built-in support for gantt actions like sorting, filtering, editing unless [Field](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_Field) property of the column is specified.
+
+## Render Button in a column
+
+You can render the Syncfusion® [Button](https://blazor.syncfusion.com/documentation/button/getting-started-with-web-app) component inside a Gantt column by using the [Template](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_Template) property..
{% tabs %}
{% highlight razor tabtitle="Index.razor" %}
diff --git a/blazor/gantt-chart/columns.md b/blazor/gantt-chart/columns.md
index 9d0f6081b7..8abfcf6481 100644
--- a/blazor/gantt-chart/columns.md
+++ b/blazor/gantt-chart/columns.md
@@ -7,25 +7,25 @@ control: Gantt Chart
documentation: ug
---
-# Columns in Blazor Gantt Chart Component
+# Columns in Blazor Gantt component
-The column displays information from a bound data source, and you can edit the values of column to update the task details through Tree Grid. The operations such as sorting, filtering, and searching can be performed based on column definitions. To display a Gantt Chart column, the `Field` property should be mapped from the data source to the column.
+The Syncfusion® Blazor Gantt Chart component displays task data in a tabular format using columns. Columns organize task data efficiently and enable user interactions such as sorting, filtering, and formatting within the Gantt chart.
-N> If the column `Field` is not specified in the data source, the column values will be empty.
+Each column is defined using the [Field](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridColumn.html#Syncfusion_Blazor_Grids_GridColumn_Field) property, which maps values from the data source. This mapping ensures accurate data binding and enables formatting and customization for each column.
-The `TreeColumnIndex` property is used to define the expander column in the Gantt Chart component to expand and collapse the child rows.
+> If the column `Field` is not specified in the data source, the column values will be empty.
## Defining columns
-Using the `GanttColumns` property, you can define the columns and custom columns in Gantt Chart. If the columns are not defined, then the default columns will be rendered based on the mapped data source fields in the `GanttTaskFields` property. If custom columns are required, then you can generate columns that was not defined in the `GanttTaskFields` property.Refer to the following code example for defining the columns in Gantt Chart along with their widths.
+You can define columns using the [GanttColumns](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumns.html) property along with the mapped fields in the [GanttTaskFields](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttTaskFields.html) property. If no columns are explicitly defined, the component automatically renders default columns based on the mapped fields in `GanttTaskFields`. To create additional columns, define additional columns that are not included in `GanttTaskFields`.
{% tabs %}
{% highlight razor tabtitle="Index.razor" %}
@using Syncfusion.Blazor.Gantt
+
-
+
@@ -36,8 +36,8 @@ Using the `GanttColumns` property, you can define the columns and custom columns
-
-
+
+
@@ -48,6 +48,22 @@ Using the `GanttColumns` property, you can define the columns and custom columns
this.TaskCollection = GetTaskCollection();
}
+ public static List GetTaskCollection()
+ {
+ List Tasks = new List()
+ {
+ new TaskData() { TaskID = 1, TaskName = "Project initiation", StartDate = new DateTime(2022, 04, 05), EndDate = new DateTime(2022, 04, 21), Status="Progress", WorkersCount=20, StartDateOnly = new DateOnly(2021, 03, 02), StartTimeOnly = new TimeOnly(10, 00, 00)},
+ new TaskData() { TaskID = 2, TaskName = "Identify Site location", StartDate = new DateTime(2022, 04, 05), Duration = "0", Progress = 5, Status="Progress", WorkersCount=10, ParentID = 1, StartDateOnly = new DateOnly(2021, 03, 04), StartTimeOnly = new TimeOnly(11, 30, 00)},
+ new TaskData() { TaskID = 3, TaskName = "Perform soil test", StartDate = new DateTime(2022, 04, 05), Duration = "4", Progress = 10, Status="Hold", WorkersCount=15, ParentID = 1, StartDateOnly = new DateOnly(2021, 03, 06), StartTimeOnly = new TimeOnly(12, 00, 00)},
+ new TaskData() { TaskID = 4, TaskName = "Soil test approval", StartDate = new DateTime(2022, 04, 05), Duration = "0", Progress = 30, Status="PostPoned", WorkersCount=5, ParentID = 1, StartDateOnly = new DateOnly(2021, 03, 08), StartTimeOnly = new TimeOnly(13, 30, 00)},
+ new TaskData() { TaskID = 5, TaskName = "Project estimation", StartDate = new DateTime(2022, 04, 06), EndDate = new DateTime(2022, 04, 21), Status="Progress", WorkersCount=25,StartDateOnly = new DateOnly(2021, 07, 10), StartTimeOnly = new TimeOnly(14, 00, 00) },
+ new TaskData() { TaskID = 6, TaskName = "Develop floor plan for estimation", StartDate = new DateTime(2022, 04, 06), Duration = "3", Progress = 30, Status="PostPoned", WorkersCount=10, ParentID = 5 , StartDateOnly = new DateOnly(2021, 10, 12), StartTimeOnly = new TimeOnly(16, 00, 00)},
+ new TaskData() { TaskID = 7, TaskName = "List materials", StartDate = new DateTime(2022, 04, 06), Duration = "3", Progress = 40, Status="Progress", WorkersCount=5, ParentID = 5, StartDateOnly = new DateOnly(2021, 10, 14), StartTimeOnly = new TimeOnly(17, 30, 00) },
+ new TaskData() { TaskID = 8, TaskName = "Estimation approval", StartDate = new DateTime(2022, 04, 06), Duration = "0", Progress = 30, Status="Progress", WorkersCount=10, ParentID = 5,StartDateOnly = new DateOnly(2021, 10, 16), StartTimeOnly = new TimeOnly(18, 00, 00) }
+ };
+ return Tasks;
+ }
+
public class TaskData
{
public int TaskID { get; set; }
@@ -62,6 +78,62 @@ Using the `GanttColumns` property, you can define the columns and custom columns
public int WorkersCount { get; set; }
public int? ParentID { get; set; }
}
+}
+
+{% endhighlight %}
+{% endtabs %}
+
+{% previewsample "https://blazorplayground.syncfusion.com/embed/hjLSCZsppMqNPDbC?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
+
+## Column types
+
+The Syncfusion® Blazor Gantt component lets you specify the data type for each column using the [GanttColumn.Type](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_Type) property. This ensures that values are rendered with appropriate formatting, such as numeric or date formats, based on the column's data type.
+
+**Gantt supports the following column types:**
+
+- **String:** Text-based column.
+- **Decimal:** Decimal number column.
+- **Double:** Double-precision number column.
+- **Integer:** Integer number column.
+- **Long:** Long integer column.
+- **Boolean:** Checkbox for true/false.
+- **Date:** Standard date column.
+- **DateTime:** Date and time column.
+- **DateOnly:** Custom column for date.
+- **TimeOnly:** Custom column for time.
+- **Checkbox:** Displays checkbox only.
+- **None:** Represents a column that binds to None data.
+
+> The `DateOnly` and `TimeOnly` formats are supported in additional columns in the Gantt Chart.
+
+{% tabs %}
+{% highlight razor tabtitle="Index.razor" %}
+
+@using Syncfusion.Blazor.Gantt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@code{
+ private List TaskCollection { get; set; }
+ protected override void OnInitialized()
+ {
+ this.TaskCollection = GetTaskCollection();
+ }
public static List GetTaskCollection()
{
@@ -78,94 +150,51 @@ Using the `GanttColumns` property, you can define the columns and custom columns
};
return Tasks;
}
+
+ public class TaskData
+ {
+ public int TaskID { get; set; }
+ public string TaskName { get; set; }
+ public DateTime StartDate { get; set; }
+ public DateTime? EndDate { get; set; }
+ public DateOnly? StartDateOnly { get; set; }
+ public TimeOnly? StartTimeOnly { get; set; }
+ public string Duration { get; set; }
+ public int Progress { get; set; }
+ public string Status { get; set; }
+ public int WorkersCount { get; set; }
+ public int? ParentID { get; set; }
+ }
}
{% endhighlight %}
{% endtabs %}
-{% previewsample "https://blazorplayground.syncfusion.com/embed/BNVyZYMaqwpAwiFv?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
-
-## Header template
+{% previewsample "https://blazorplayground.syncfusion.com/embed/VZhyXEMEgbFSXRrx?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
-N> Before adding the header template to the Gantt Chart, it is strongly recommended to go through the [template](./templates#templates) section topic to configure the template.
+## Column formatting
-The Header Template has options to display custom element values or content in the header. You can use the [HeaderTemplate](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_HeaderTemplate) of the [GanttColumn](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html) component to specify the custom content.
+The Syncfusion® Gantt Chart component for Blazor supports column formatting to customize data presentation. You can format numbers, dates, or apply templates based on specific requirements. Use the [GanttColumn.Format](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_Format) property to define the desired format for each column.
{% tabs %}
{% highlight razor tabtitle="Index.razor" %}
@using Syncfusion.Blazor.Gantt
-@using Syncfusion.Blazor.Grids
-
-
+
+
+
-
-
-
-
- @((context as GridColumn).HeaderText)
-
-
-
-
-
-
-
- @((context as GridColumn).HeaderText)
-
-
-
-
-
-
-
- @((context as GridColumn).HeaderText)
-
-
-
-
-
-
-
- @((context as GridColumn).HeaderText)
-
-
-
-
-
-
-
- @((context as GridColumn).HeaderText)
-
-
-
+
+
+
+
-
-@code{
+@code{
private List TaskCollection { get; set; }
-
+ private string NumberFormat = "C";
protected override void OnInitialized()
{
this.TaskCollection = GetTaskCollection();
@@ -176,56 +205,73 @@ The Header Template has options to display custom element values or content in t
public int TaskID { get; set; }
public string TaskName { get; set; }
public DateTime StartDate { get; set; }
- public DateTime? EndDate { get; set; }
+ public DateTime EndDate { get; set; }
public string Duration { get; set; }
public int Progress { get; set; }
- public int? Parent_Id { get; set; }
-
+ public int? ParentID { get; set; }
}
public static List GetTaskCollection()
{
- List Tasks = new List()
- {
- new TaskData() { TaskID = 1, TaskName = "Project initiation", StartDate = new DateTime(2022, 04, 05), EndDate = new DateTime(2022, 04, 21)},
- new TaskData() { TaskID = 2, TaskName = "Identify Site location", StartDate = new DateTime(2022, 04, 05), Duration = "0", Progress = 30, Parent_Id = 1},
- new TaskData() { TaskID = 3, TaskName = "Perform soil test", StartDate = new DateTime(2022, 04, 05), Duration = "4", Progress = 40, Parent_Id = 1},
- new TaskData() { TaskID = 4, TaskName = "Soil test approval", StartDate = new DateTime(2022, 04, 05), Duration = "0", Progress = 30, Parent_Id =1},
- new TaskData() { TaskID = 5, TaskName = "Project estimation", StartDate = new DateTime(2022, 04, 06), EndDate = new DateTime(2022, 04, 21)},
- new TaskData() { TaskID = 6, TaskName = "Develop floor plan for estimation", StartDate = new DateTime(2022, 04, 06), Duration = "3", Progress = 30, Parent_Id =5},
- new TaskData() { TaskID = 7, TaskName = "List materials", StartDate = new DateTime(2022, 04, 06), Duration = "3", Progress = 40, Parent_Id =5},
- new TaskData() { TaskID = 8, TaskName = "Estimation approval", StartDate = new DateTime(2022, 04, 06), Duration = "0", Progress = 30, Parent_Id =5}
-
+ List Tasks = new List()
+ {
+ new TaskData() { TaskID = 1, TaskName = "Project initiation", StartDate = new DateTime(2022, 04, 05), EndDate = new DateTime(2022, 04, 21), },
+ new TaskData() { TaskID = 2, TaskName = "Identify Site location", StartDate = new DateTime(2022, 04, 05), Duration = "0", Progress = 30, ParentID = 1 },
+ new TaskData() { TaskID = 3, TaskName = "Perform soil test", StartDate = new DateTime(2022, 04, 05), Duration = "4", Progress = 40, ParentID = 1 },
+ new TaskData() { TaskID = 4, TaskName = "Soil test approval", StartDate = new DateTime(2022, 04, 05), Duration = "0", Progress = 30, ParentID = 1 },
+ new TaskData() { TaskID = 5, TaskName = "Project estimation", StartDate = new DateTime(2022, 04, 06), EndDate = new DateTime(2022, 04, 21), },
+ new TaskData() { TaskID = 6, TaskName = "Develop floor plan for estimation", StartDate = new DateTime(2022, 04, 06), Duration = "3", Progress = 30, ParentID = 5 },
+ new TaskData() { TaskID = 7, TaskName = "List materials", StartDate = new DateTime(2022, 04, 06), Duration = "3", Progress = 40, ParentID = 5 },
+ new TaskData() { TaskID = 8, TaskName = "Estimation approval", StartDate = new DateTime(2022, 04, 06), Duration = "0", Progress = 30, ParentID = 5 }
};
return Tasks;
- } }
+ }
+}
{% endhighlight %}
{% endtabs %}
-{% previewsample "https://blazorplayground.syncfusion.com/embed/BNhSDOsYqcoTwbwV?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
+{% previewsample "https://blazorplayground.syncfusion.com/embed/rXVICZWpUlnjXERR?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
-## Format
+>* The Gantt uses the `Internalization` library to format values based on the specified format and culture.
+>* By default, the number and date values are formatted in **en-US** locale. You can localize the currency and date in different locale as explained [here](https://www.syncfusion.com/blazor-components/blazor-gantt-chart).
+>* The available format codes may vary depending on the data type of the column.
+>* You can also customize the formatting further by providing a custom function to the `GanttColumn.Format` property, instead of a format string.
+>* Make sure that the format string is valid and compatible with the data type of the column, to avoid unexpected results.
+
+### Number formatting
-To format the cell values based on a specific culture, use the `GanttColumn.Format` property. The [Blazor Gantt Chart](https://www.syncfusion.com/blazor-components/blazor-gantt-chart) component uses the `Internationalization` library to format `number` and `date` values.
+The Syncfusion® Gantt Chart component for Blazor supports number formatting through the [GanttColumn.Format](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_Format) property, where standard format strings define numeric value presentation including currency, percentage, and decimal formats. The following standard format strings are available:
+
+| Format | Description | Remarks |
+|--------|--------------------|-------------------------------------------------------------------------|
+| N | Numeric format | Use `N2`, `N3`, etc., to set the number of decimal places. |
+| C | Currency format | Use `C2`, `C3`, etc., to define precision for currency values. |
+| P | Percentage format | Input should be between 0 and 1; `P2`, `P3`, etc., control precision. |
+
+
+The following example code demonstrates the formatting of data for the **TaskID** column using the **N2** format, the **Progress** column using the **P2** format.
{% tabs %}
{% highlight razor tabtitle="Index.razor" %}
@using Syncfusion.Blazor.Gantt
+
-
+
-
-
+
+
+
+
+
@code{
private List TaskCollection { get; set; }
- private string NumberFormat = "C";
+
protected override void OnInitialized()
{
this.TaskCollection = GetTaskCollection();
@@ -262,25 +308,11 @@ To format the cell values based on a specific culture, use the `GanttColumn.Form
{% endhighlight %}
{% endtabs %}
-{% previewsample "https://blazorplayground.syncfusion.com/embed/rXBSjOCkgcRbpweC?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
-
-N> By default, the `number` and `date` values are formatted in `en-US` culture.
-
-### Number formatting
-
-The number or integer values can be formatted using the following format strings.
-
-Format |Description |Remarks
------|-----
-N | Denotes numeric type. | The numeric format is followed by an integer value like N2 or N3, which denotes the number of precisions to be allowed.
-C | Denotes currency type. | The currency format is followed by an integer value like C2 or C3, which denotes the number of precisions to be allowed.
-P | Denotes percentage type | The percentage format expects the input value to be in the range of 0 to 100. For example, the cell value `0.2` is formatted as `20%`. The percentage format is followed by an integer value like P2, P3, which denotes the number of precisions to be allowed.
+{% previewsample "https://blazorplayground.syncfusion.com/embed/BNVSstCJJrKQgFRw?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
### Date formatting
-You can format date values either using the built-in date format string or a custom format string. For the built-in date format, you can specify the `GanttColumn.Format` property as string (example: `yMd`).
-
-You can also use the custom format string to format the date values. Some of the custom formats and the formatted date values are given in the following table.
+The Syncfusion® Gantt component for Blazor supports date formatting in columns using the [GanttColumn.Format](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_Format) property, where format strings such as **d**, **D**, **MMM dd, yyyy** can be applied. Both built-in formats like **yMd** and custom formats are supported to define the layout and detail of date and time values based on column requirements. The following custom formats and their corresponding output are listed below:
Format | Formatted value
-----|-----
@@ -294,9 +326,9 @@ Format | Formatted value
{% highlight razor tabtitle="Index.razor" %}
@using Syncfusion.Blazor.Gantt
+
-
+
@@ -309,6 +341,7 @@ Format | Formatted value
@code{
private List TaskCollection { get; set; }
private string DateFormat = "MM/dd/yyyy";
+
protected override void OnInitialized()
{
this.TaskCollection = GetTaskCollection();
@@ -347,19 +380,17 @@ Format | Formatted value
{% previewsample "https://blazorplayground.syncfusion.com/embed/LDreDaMuKwGwqTMD?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
-
+## AutoFit columns
-## Autofit columns
-
-The Gantt chart has a feature that allows to automatically adjust column widths based on the maximum content width of each column when you double-click on the resizer symbol located in a specific column header. This feature ensures that all data in the Gantt chart rows is displayed without wrapping. To use this feature, set the [AllowResizing](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_AllowResizing) property to true.
+The Syncfusion® Gantt component for Blazor supports automatic column width adjustment based on content. Double-clicking the column header resizer adjusts the width to fit the maximum content, ensuring clear data visibility without wrapping. To enable this feature, set [AllowResizing](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_AllowResizing) to **true**.
{% tabs %}
{% highlight razor tabtitle="Index.razor" %}
@using Syncfusion.Blazor.Gantt
+
-
+
@@ -370,31 +401,20 @@ The Gantt chart has a feature that allows to automatically adjust column widths
-
-
+
+
+
@code {
private SfGantt Gantt;
private List TaskCollection { get; set; }
+
protected override void OnInitialized()
{
this.TaskCollection = GetTaskCollection();
}
- public class TaskData
- {
- public int TaskID { get; set; }
- public string TaskName { get; set; }
- public DateTime StartDate { get; set; }
- public DateTime? EndDate { get; set; }
- public DateOnly? StartDateOnly { get; set; }
- public TimeOnly? StartTimeOnly { get; set; }
- public string Duration { get; set; }
- public int Progress { get; set; }
- public string Status { get; set; }
- public int WorkersCount { get; set; }
- public int? ParentID { get; set; }
- }
+
public static List GetTaskCollection()
{
List Tasks = new List()
@@ -410,6 +430,21 @@ The Gantt chart has a feature that allows to automatically adjust column widths
};
return Tasks;
}
+
+ public class TaskData
+ {
+ public int TaskID { get; set; }
+ public string TaskName { get; set; }
+ public DateTime StartDate { get; set; }
+ public DateTime? EndDate { get; set; }
+ public DateOnly? StartDateOnly { get; set; }
+ public TimeOnly? StartTimeOnly { get; set; }
+ public string Duration { get; set; }
+ public int Progress { get; set; }
+ public string Status { get; set; }
+ public int WorkersCount { get; set; }
+ public int? ParentID { get; set; }
+ }
}
{% endhighlight %}
@@ -419,7 +454,7 @@ The Gantt chart has a feature that allows to automatically adjust column widths
### Resizing a column to fit its content using method
-In Gantt chart, you can automatically adjust specific column width based on the maximum content width of each column, ensuring that the width displays the content without wrapping or hiding by using [AutoFitColumnsAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_AutoFitColumnsAsync) method. You can autofit specific columns at initial rendering by invoking the `AutoFitColumnsAsync` method in DataBound event.
+You can resize a column in Gantt Chart to fit its content using the [AutoFitColumnsAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_AutoFitColumnsAsync) method. This adjusts the column width based on the widest cell without wrapping. To apply this during initial rendering, call the method in the [DataBound](https://blazor.syncfusion.com/documentation/gantt-chart/events#databound) event.
{% tabs %}
{% highlight razor tabtitle="Index.razor" %}
@@ -427,8 +462,7 @@ In Gantt chart, you can automatically adjust specific column width based on the
@using Syncfusion.Blazor.Gantt
-
+
@@ -495,9 +529,9 @@ In Gantt chart, you can automatically adjust specific column width based on the
{% previewsample "https://blazorplayground.syncfusion.com/embed/hNByNEMaUcklmdnG?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
-## Change tree/expander column
+## Change tree column
-The tree/expander column is a column in the Gantt Chart component that has icons to expand or collapse the parent records. You can define the tree column index in the Gantt Chart component by using the `TreeColumnIndex` property and the default value of this property is `0`. The following code example shows how to use this property.
+The Syncfusion® Blazor Gantt Chart component displays hierarchical task relationships using expand/collapse icons. These icons help users navigate parent and child tasks efficiently. To configure their position, set the `treeColumnIndex` property to the index of the column where the icons should appear. By default, the value is **0**, which places them in the first column.
{% tabs %}
{% highlight razor tabtitle="Index.razor" %}
@@ -547,16 +581,32 @@ The tree/expander column is a column in the Gantt Chart component that has icons
{% previewsample "https://blazorplayground.syncfusion.com/embed/BNhItaiEAlXxBwJd?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
-## Show or hide columns dynamically
+## Show or hide columns
+
+The Syncfusion® Blazor Gantt Chart component allows dynamic control over column visibility using built-in properties and methods.
+
+### Using methods
+
+You can dynamically show or hide columns using the [ShowColumnsAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_ShowColumnsAsync_System_String___System_String_) and [HideColumnsAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_HideColumnsAsync_System_String___System_String_) methods. These methods accept either a single value or an array of values, and a second parameter to specify whether the value refers to the column's `HeaderText` or `Field`.
-You can show or hide gantt component columns dynamically using external buttons by invoking the `ShowColumnsAsync` or `HideColumnsAsync` method.
+**Based on header text:**
+
+To control visibility using the column's header text:
+
+- Pass the header text (or array of header texts) as the first parameter.
+- Specify `HeaderText` as the second parameter.
+
+The following example demonstrates hiding and showing the **Duration** column using button clicks:
{% tabs %}
{% highlight razor tabtitle="Index.razor" %}
@using Syncfusion.Blazor.Gantt
-
-
+
+
+
+
+
@@ -573,17 +623,102 @@ You can show or hide gantt component columns dynamically using external buttons
@code{
public SfGantt Gantt;
private List TaskCollection { get; set; }
- private string[] ColumnList = {"TaskName", "StartDate"};
+ private string[] ColumnList = {"Duration"};
+
+ public void show() {
+ this.Gantt.ShowColumnsAsync(ColumnList, "HeaderText");
+ }
+
+ public void hide() {
+ this.Gantt.HideColumnsAsync(ColumnList, "HeaderText");
+ }
+
+ protected override void OnInitialized()
+ {
+ this.TaskCollection = GetTaskCollection();
+ }
+ public class TaskData
+ {
+ public int TaskID { get; set; }
+ public string TaskName { get; set; }
+ public DateTime StartDate { get; set; }
+ public DateTime? EndDate { get; set; }
+ public string Duration { get; set; }
+ public int Progress { get; set; }
+ public int? ParentID { get; set; }
+ }
+
+ public static List GetTaskCollection()
+ {
+ List Tasks = new List()
+ {
+ new TaskData() { TaskID = 1, TaskName = "Project initiation", StartDate = new DateTime(2022, 04, 05), EndDate = new DateTime(2022, 04, 21), },
+ new TaskData() { TaskID = 2, TaskName = "Identify Site location", StartDate = new DateTime(2022, 04, 05), Duration = "0", Progress = 30, ParentID = 1 },
+ new TaskData() { TaskID = 3, TaskName = "Perform soil test", StartDate = new DateTime(2022, 04, 05), Duration = "4", Progress = 40, ParentID = 1 },
+ new TaskData() { TaskID = 4, TaskName = "Soil test approval", StartDate = new DateTime(2022, 04, 05), Duration = "0", Progress = 30, ParentID = 1 },
+ new TaskData() { TaskID = 5, TaskName = "Project estimation", StartDate = new DateTime(2022, 04, 06), EndDate = new DateTime(2022, 04, 21), },
+ new TaskData() { TaskID = 6, TaskName = "Develop floor plan for estimation", StartDate = new DateTime(2022, 04, 06), Duration = "3", Progress = 30, ParentID = 5 },
+ new TaskData() { TaskID = 7, TaskName = "List materials", StartDate = new DateTime(2022, 04, 06), Duration = "3", Progress = 40, ParentID = 5 },
+ new TaskData() { TaskID = 8, TaskName = "Estimation approval", StartDate = new DateTime(2022, 04, 06), Duration = "0", Progress = 30, ParentID = 5 },
+ };
+ return Tasks;
+ }
+}
+
+{% endhighlight %}
+{% endtabs %}
+
+{% previewsample "https://blazorplayground.syncfusion.com/embed/hjBestMfJfMfjSst?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
+
+**Based on field:**
+
+To control visibility using the column's field name:
+
+- Pass the field name (or array of field names) as the first parameter.
+- Specify `Field` as the second parameter.
+
+The following example demonstrates hiding and showing the **TaskName** and **Duration** columns using button clicks:
+
+{% tabs %}
+{% highlight razor tabtitle="Index.razor" %}
+
+@using Syncfusion.Blazor.Gantt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@code{
+ public SfGantt Gantt;
+ private List TaskCollection { get; set; }
+ private string[] ColumnList = {"TaskName", "Duration"};
+
public void show() {
this.Gantt.ShowColumnsAsync(ColumnList, "Field");
}
+
public void hide() {
this.Gantt.HideColumnsAsync(ColumnList, "Field");
}
+
protected override void OnInitialized()
{
this.TaskCollection = GetTaskCollection();
}
+
public class TaskData
{
public int TaskID { get; set; }
@@ -615,21 +750,32 @@ You can show or hide gantt component columns dynamically using external buttons
{% endhighlight %}
{% endtabs %}
-{% previewsample "https://blazorplayground.syncfusion.com/embed/VthINYsEAPMbEnXr?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
+{% previewsample "https://blazorplayground.syncfusion.com/embed/rtVyiDspzzqKOYOE?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
+
+## Controlling Gantt actions
-## Controlling Gantt column actions
+The Syncfusion® Blazor Gantt Chart component allows fine-grained control over column-level actions such as editing, filtering, sorting, resizing, and reordering. These actions can be enabled or disabled individually using the following properties in the [GanttColumn](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html) configuration:
-You can enable or disable gantt component action for a particular column by setting the `AllowFiltering`, `AllowSorting`, `AllowReordering`, and `AllowEditing` properties.
+| Property | Description |
+|----------|-------------|
+| [AllowEditing](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_AllowEditing) | Enables or disables editing for a column. |
+| [AllowFiltering](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_AllowFiltering) | Enables or disables filtering for a column. |
+| [AllowSorting](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_AllowSorting) | Enables or disables sorting for a column. |
+| [AllowReordering](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_AllowReordering) | Enables or disables reordering for a column. |
+| [AllowResizing](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_AllowResizing) | Enables or disables resizing for a column. |
+
+> **Note:** These settings are applied per column and do not affect global Gantt behavior.
{% tabs %}
{% highlight razor tabtitle="Index.razor" %}
@using Syncfusion.Blazor.Gantt
-
+
+
-
+
@@ -641,10 +787,12 @@ You can enable or disable gantt component action for a particular column by sett
@code{
public SfGantt Gantt;
private List TaskCollection { get; set; }
+
protected override void OnInitialized()
{
this.TaskCollection = GetTaskCollection();
}
+
public class TaskData
{
public int TaskID { get; set; }
@@ -677,22 +825,68 @@ You can enable or disable gantt component action for a particular column by sett
{% endhighlight %}
{% endtabs %}
-{% previewsample "https://blazorplayground.syncfusion.com/embed/VZhyXEMEgbFSXRrx?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
+{% previewsample "https://blazorplayground.syncfusion.com/embed/VtLoCjCQLJZKGdyh?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
+
+## Responsive columns
+
+The Syncfusion® Blazor Gantt Chart component provides a built-in feature to control column visibility based on media queries using the `HideAtMedia` property in the column object. This method can be used to hide columns automatically when the screen width matches specified [media query](http://cssmediaqueries.com/what-are-css-media-queries.html) conditions.
+
+The following example demonstrates a Gantt chart where the **Job Name** column is set to `(min-width: 700px)`, meaning it will be hidden when the browser width is less than or equal to 700px. Similarly, the **Duration** column is set to `(max-width: 500px)`, so it will be hidden when the browser width exceeds 500px.
+
+{% tabs %}
+{% highlight razor tabtitle="Index.razor" %}
+
+@using Syncfusion.Blazor.Gantt
+
+
+
+
+
+
+
+
+
+
+@code{
+ private List TaskCollection { get; set; }
+
+ protected override void OnInitialized()
+ {
+ this.TaskCollection = GetTaskCollection();
+ }
-## Column type
+ public class TaskData
+ {
+ public int TaskID { get; set; }
+ public string TaskName { get; set; }
+ public DateTime StartDate { get; set; }
+ public DateTime? EndDate { get; set; }
+ public string Duration { get; set; }
+ public int Progress { get; set; }
+ public int? ParentID { get; set; }
+ }
-Column type can be specified using the `GanttColumn.Type` property. It specifies the type of data the column binds. If the `GanttColumn.Format` is defined for a column, the column uses `GanttColumn.Type` to select the appropriate format option number or date.
+ public static List GetTaskCollection()
+ {
+ List Tasks = new List()
+ {
+ new TaskData() { TaskID = 1, TaskName = "Project initiation", StartDate = new DateTime(2022, 04, 05), EndDate = new DateTime(2022, 04, 21), },
+ new TaskData() { TaskID = 2, TaskName = "Identify Site location", StartDate = new DateTime(2022, 04, 05), Duration = "0", Progress = 30, ParentID = 1 },
+ new TaskData() { TaskID = 3, TaskName = "Perform soil test", StartDate = new DateTime(2022, 04, 05), Duration = "4", Progress = 40, ParentID = 1 },
+ new TaskData() { TaskID = 4, TaskName = "Soil test approval", StartDate = new DateTime(2022, 04, 05), Duration = "0", Progress = 30, ParentID = 1 },
+ new TaskData() { TaskID = 5, TaskName = "Project estimation", StartDate = new DateTime(2022, 04, 06), EndDate = new DateTime(2022, 04, 21), },
+ new TaskData() { TaskID = 6, TaskName = "Develop floor plan for estimation", StartDate = new DateTime(2022, 04, 06), Duration = "3", Progress = 30, ParentID = 5 },
+ new TaskData() { TaskID = 7, TaskName = "List materials", StartDate = new DateTime(2022, 04, 06), Duration = "3", Progress = 40, ParentID = 5 },
+ new TaskData() { TaskID = 8, TaskName = "Estimation approval", StartDate = new DateTime(2022, 04, 06), Duration = "0", Progress = 30, ParentID = 5 }
+ };
+ return Tasks;
+ }
+}
-Gantt column supports the following types:
+{% endhighlight %}
+{% endtabs %}
-* String
-* Number
-* Boolean
-* Date
-* DateTime
-* DateOnly
-* TimeOnly
+{% previewsample "https://blazorplayground.syncfusion.com/embed/VNhyiNDuKAHMJvWZ?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
-N> If the `GanttColumn.Type` is not defined, it will be determined from the first record of the `DataSource`. If the first record of the `DataSource` is null/blank value for a column then it is necessary to define the `GanttColumn.Type` for that column.
-N> The `DateOnly` and `TimeOnly` formats are supported in custom columns in the Gantt Chart.
diff --git a/blazor/gantt-chart/context-menu.md b/blazor/gantt-chart/context-menu.md
index d250d79f80..bea77ba1e1 100644
--- a/blazor/gantt-chart/context-menu.md
+++ b/blazor/gantt-chart/context-menu.md
@@ -9,7 +9,9 @@ documentation: ug
# Context Menu in Blazor Gantt Chart Component
-The [Blazor Gantt Chart](https://www.syncfusion.com/blazor-components/blazor-gantt-chart) component allows you to perform quick actions by using the context menu. When right-clicking the context menu, the context menu options will be shown. To enable this feature, set the [EnableContextMenu](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_EnableContextMenu) to “true”. The default context menu options are enabled using the [GanttEditSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttEditSettings.html) property. The context menu options can be customized using the [ContextMenuItems](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_ContextMenuItems) property.
+The Blazor Gantt Chart component provides quick access to actions through a context menu. On right-click, context menu options are displayed based on the clicked element.
+
+To enable this feature, set the [EnableContextMenu](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_EnableContextMenu) to **true**. The context menu options can be customized using the [ContextMenuItems](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_ContextMenuItems) property.
The default items are listed in the following table:
@@ -33,6 +35,7 @@ Items| Description
{% highlight razor tabtitle="Index.razor" %}
@using Syncfusion.Blazor.Gantt
+
@@ -41,10 +44,12 @@ Items| Description
@code {
private List TaskCollection { get; set; }
+
protected override void OnInitialized()
{
this.TaskCollection = GetTaskCollection();
}
+
public class TaskData
{
public int TaskID { get; set; }
@@ -80,16 +85,15 @@ Items| Description
## Custom context menu items
-The custom context menu items can be added by defining the [ContextMenuItems](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_ContextMenuItems) as a collection of [ContextMenuItemModel](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.ContextMenuItemModel.html). Actions for these customized items can be defined in the [ContextMenuItemClicked](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttEvents-1.html#Syncfusion_Blazor_Gantt_GanttEvents_1_ContextMenuItemClicked) event.
-
-The following sample code demonstrates defining a custom context menu item and its corresponding action in the [ContextMenuItemClicked](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttEvents-1.html#Syncfusion_Blazor_Gantt_GanttEvents_1_ContextMenuItemClicked) event.
+You can configure custom context menu items by assigning a collection of `ContextMenuItemModel` to the [ContextMenuItems](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_ContextMenuItems) property. To define actions for these items, use the [ContextMenuItemClicked](https://blazor.syncfusion.com/documentation/gantt-chart/events#contextmenuitemclicked) event.
{% tabs %}
{% highlight razor tabtitle="Index.razor" %}
@using Syncfusion.Blazor.Gantt
@using Syncfusion.Blazor.Grids
-
+
+
@@ -97,20 +101,23 @@ The following sample code demonstrates defining a custom context menu item and i
@code {
public List TaskCollection { get; set; }
- private SfGantt Gantt;
+ private SfGantt GanttInstance;
+
private List contextMenuItems = new List()
{
new ContextMenuItemModel(){Text="Refresh", Target=".e-content",Id="Refresh"}
};
+
protected override void OnInitialized()
{
this.TaskCollection = GetTaskCollection();
}
+
private async void ContextMenuItemClickedHandler(ContextMenuClickEventArgs args)
{
if(args.Item.Id == "Refresh")
{
- await Gantt.RefreshAsync();
+ await GanttInstance.RefreshAsync();
}
}
@@ -148,17 +155,16 @@ The following sample code demonstrates defining a custom context menu item and i
## Built-in and custom context menu items
-Gantt Chart has an option to use both built-in and custom context menu items at the same time.
-
-The following sample code demonstrates defining built-in and custom context menu items and custom context menu item corresponding action in the [ContextMenuItemClicked](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttEvents-1.html#Syncfusion_Blazor_Gantt_GanttEvents_1_ContextMenuItemClicked) event,
+You can configure built-in and custom context menu items at the same time in the Gantt Chart by assigning a collection of `ContextMenuItemModel` to the `[ContextMenuItems](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_ContextMenuItems) property. The corresponding actions for custom items are handled through the [ContextMenuItemClicked](https://blazor.syncfusion.com/documentation/gantt-chart/events#contextmenuitemclicked) event.
{% tabs %}
{% highlight razor tabtitle="Index.razor" %}
@using Syncfusion.Blazor.Gantt
@using Syncfusion.Blazor.Grids
-
+
+
@@ -166,18 +172,21 @@ The following sample code demonstrates defining built-in and custom context menu
+
@code {
public List TaskCollection { get; set; }
- private SfGantt Gantt;
+ private SfGantt GanttInstance;
+
protected override void OnInitialized()
{
this.TaskCollection = GetTaskCollection();
}
+
private async void ContextMenuItemClickedHandler(ContextMenuClickEventArgs args)
{
- if (args.Item.Id == "Refresh")
+ if (args.Item.Id == "copywithheader")
{
- await Gantt.RefreshAsync();
+ await GanttInstance.CopyAsync(true);
}
}
public class TaskData
@@ -209,13 +218,17 @@ The following sample code demonstrates defining built-in and custom context menu
{% endhighlight %}
{% endtabs %}
-{% previewsample "https://blazorplayground.syncfusion.com/embed/VZrSiZDEUogRNlUf?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
+{% previewsample "https://blazorplayground.syncfusion.com/embed/LNLoWNWHhsckRdfz?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
## Sub context menu items
-The sub-context menu items can be added by defining the collection of **MenuItems** for **Items** Property in [ContextMenuItems](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_ContextMenuItems). Actions for these customized items can be defined in the [ContextMenuItemClicked](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttEvents-1.html#Syncfusion_Blazor_Gantt_GanttEvents_1_ContextMenuItemClicked) event.
+To configure nested context menu items (sub-menus) in the Blazor Gantt Chart, follow these steps:
-The following sample code demonstrates defining the sub-context menu item and its corresponding action in the [ContextMenuItemClicked](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttEvents-1.html#Syncfusion_Blazor_Gantt_GanttEvents_1_ContextMenuItemClicked) event,
+1. Define a list of `ContextMenuItemModel` objects using the [ContextMenuItems](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_ContextMenuItems) property.
+2. Add sub-items by assigning a collection of `MenuItems` to the `Items` property within each `ContextMenuItemModel`.
+3. Use the [ContextMenuItemClicked](https://blazor.syncfusion.com/documentation/gantt-chart/events#contextmenuitemclicked) event to handle actions for individual menu items.
+
+The following example demonstrates how to configure a sub-context menu titled **Gantt Action**, which includes the sub-items **Copy with headers** and **Edit**.
{% tabs %}
{% highlight razor tabtitle="Index.razor" %}
@@ -236,19 +249,25 @@ The following sample code demonstrates defining the sub-context menu item and it
private SfGantt Gantt;
private List contextMenuItems = new List()
{
- new ContextMenuItemModel{Text="Gantt Action",Target=".e-content",Id="GanttAction",
- Items=new List