You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blazor/gantt-chart/clipboard.md
+35-20Lines changed: 35 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,13 +9,14 @@ documentation: ug
9
9
10
10
# Clipboard in Blazor Gantt Chart component
11
11
12
-
The clipboard provides an option to copy selected rows or cell data into the clipboard.
12
+
The clipboard feature allows copying selected row or cell data from the Gantt Chart component.
13
13
14
-
The following list of keyboard shortcuts is supported in the Gantt Chart to copy selected rows or cells data into the clipboard.
14
+
The following keyboard shortcut is supported for clipboard operations:
15
15
16
16
Interaction keys |Description
17
17
-----|-----
18
18
<kbd>Ctrl + C</kbd> |Copy selected rows or cells data into clipboard.
19
+
<kbd>Ctrl + Shift + H</kbd> |Copy selected rows or cells data with header into clipboard.
19
20
20
21
{% tabs %}
21
22
{% highlight razor tabtitle="Index.razor" %}
@@ -70,13 +71,14 @@ Interaction keys |Description
70
71
71
72
## Copy to clipboard by external buttons
72
73
73
-
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.
74
+
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.
@@ -108,6 +112,7 @@ To copy the data of the selected rows or cells into the clipboard with the help
108
112
await this.GanttObject.CopyAsync(WithHeader);
109
113
}
110
114
}
115
+
111
116
public class TaskData
112
117
{
113
118
public int TaskID { get; set; }
@@ -144,15 +149,15 @@ To copy the data of the selected rows or cells into the clipboard with the help
144
149
145
150
## Copy hierarchy modes
146
151
147
-
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.
152
+
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:
148
153
149
-
***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.
154
+
-**Parent**: Copies selected records along with their parent records. If no parent exists, only the selected records are copied.
150
155
151
-
***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.
156
+
-**Child**: Copies selected records along with their child records. If no child exists, only the selected records are copied.
152
157
153
-
***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.
158
+
-**Both**: Copies selected records with both parent and child records. If neither exists, only the selected records are copied.
154
159
155
-
***None**: Only the selected records will be in the clipboard.
160
+
-**None**: Copies only the selected records without any hierarchy.
156
161
157
162
{% tabs %}
158
163
{% highlight razor tabtitle="Index.razor" %}
@@ -176,6 +181,7 @@ Gantt Chart provides support for a set of copy modes with the [CopyHierarchyMode
@@ -187,6 +193,7 @@ Gantt Chart provides support for a set of copy modes with the [CopyHierarchyMode
187
193
public string Id { get; set; }
188
194
public string Mode { get; set; }
189
195
}
196
+
190
197
protected override void OnInitialized()
191
198
{
192
199
this.TaskCollection = GetTaskCollection();
@@ -229,6 +236,7 @@ Gantt Chart provides support for a set of copy modes with the [CopyHierarchyMode
229
236
await this.GanttObject.CopyAsync(WithHeader);
230
237
}
231
238
}
239
+
232
240
public class TaskData
233
241
{
234
242
public int TaskID { get; set; }
@@ -265,15 +273,18 @@ Gantt Chart provides support for a set of copy modes with the [CopyHierarchyMode
265
273
266
274
## Paste
267
275
268
-
The content of a row/cells can be copied by selecting the rows/cells and pressing the <kbd>Ctrl + C</kbd> shortcut key to copy data and paste it by pressing <kbd>Ctrl + V</kbd> shortcut key.
276
+
You can copy the content of a row or cell by selecting it and pressing the <kbd>Ctrl + C</kbd> shortcut key. To paste the copied data, press <kbd>Ctrl + V</kbd>.
277
+
278
+
**Selected row copy and paste:**
269
279
270
-
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`.
280
+
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.
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.`
408
+
**Selected Cell Copy and Paste:**
409
+
410
+
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.
394
411
395
412
{% tabs %}
396
413
{% highlight razor tabtitle="Index.razor" %}
@@ -514,26 +531,24 @@ In the following code example, selected cells are copied and pasted by using the
To achieve the autofill functionality in the Gantt chart, the drag selection feature must be enabled, and the keyup event must be bound.
536
+
To achieve the autofill functionality in the Gantt chart, the drag selection feature must be enabled, and the `keyup` event must be bound.
520
537
521
538
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:
Using these settings, the user can select multiple cells in the Gantt chart by dragging the mouse.
529
-
530
-
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).
545
+
These settings allow users to select multiple cells by dragging the mouse.
531
546
532
-
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.
547
+
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.
533
548
534
-
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.
549
+
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.
535
550
536
-
With this customization, users can easily and quickly update multiple cellsin the Gantt chart, improving overall efficiency.
551
+
This customization enables users to quickly update multiple cells, improving data entry efficiency in the Gantt chart.
Copy file name to clipboardExpand all lines: blazor/gantt-chart/column-menu.md
+10-12Lines changed: 10 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,22 +9,20 @@ documentation: ug
9
9
10
10
# Column Menu in Blazor Gantt Chart Component
11
11
12
-
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.
12
+
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.
13
13
14
-
## Column Menu
14
+
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.
15
15
16
-
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.
17
-
18
-
The default menu items are:
16
+
The following built-in column menu items are available:
19
17
20
18
| Item | Description |
21
19
|------|-------------|
22
-
|`Sort Ascending`| Sort the current column in ascending order. |
23
-
|`Sort Descending`| Sort the current column in descending order. |
24
-
|`Auto Fit`| Auto fit the current column. |
25
-
|`Auto Fit All`| Auto fit all columns. |
26
-
|`Column Chooser`| Choose column visibility. |
27
-
|`Filter`|Show the filter menu based on column type. |
20
+
| Sort Ascending | Sort the current column in ascending order. |
21
+
| Sort Descending | Sort the current column in descending order. |
22
+
| Auto Fit | Auto fit the current column. |
23
+
| Auto Fit All | Auto fit all columns. |
24
+
| Column Chooser | Choose column visibility. |
25
+
| Filter |Displays filtering options based on [FilterSettings.FilterType](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttFilterSettings.html#Syncfusion_Blazor_Gantt_GanttFilterSettings_FilterType). |
> **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`.
77
+
> **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**.
0 commit comments