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
Tree Grid provides support for a set of copy modes with [CopyHierarchyMode](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.CopyHierarchyType.html) property. The below are the type of filter mode available in the Tree Grid.
192
+
The TreeGrid supports multiple copy hierarchy modes using the [CopyHierarchMode](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.CopyHierarchyType.html) property.
193
193
194
-
***Parent** : This is the default copy hierarchy mode in the Tree Grid. Clipboard value will have the selected records with its parent records, if the selected records does not have any parent record then the selected record will be in clipboard.
195
-
196
-
***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 clipboard.
197
-
198
-
***Both** : Clipboard value will have the selected records with its both parent and child record. If the selected records do not have any parent and child record then the selected records alone are copied to the clipboard.
199
-
200
-
***None** : Only the selected records will be in the clipboard.
194
+
| Mode | Description |
195
+
|------|-------------|
196
+
|**Parent**| Copies selected records along with their parent records |
197
+
|**Child**| Copies selected records along with their child records |
198
+
|**Both**| Copies selected records with both parent and child records |
* Since the string values are not pasted to number and date type, so when the copied string type cells are pasted to number type cells, then it will be displayed as **NaN**. For date type cells, when the copied string format cells are pasted to date type cells, then it will be displayed as an **empty cell**.
386
+
- String values pasted into number-type cells will display as **NaN**
387
+
- String values pasted into date-type cells will display as **empty cells**
388
+
- Sequential data generation is not supported
388
389
389
-
## Clipboard events
390
+
## Clipboard Events
390
391
391
-
Events are triggered when performing a copy or paste action on TreeGrid.
392
+
The following events are triggered during clipboard operations:
392
393
393
-
*[BeforeCopyPaste](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.TreeGridEvents-1.html#Syncfusion_Blazor_TreeGrid_TreeGridEvents_1_BeforeCopyPaste) : This event is triggered before the cell is copied or pasted in the tree grid cell, and you can cancel the entire copy or paste action by using this event.
394
+
*[BeforeCopyPaste](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.TreeGridEvents-1.html#Syncfusion_Blazor_TreeGrid_TreeGridEvents_1_BeforeCopyPaste) : Triggered before copying or pasting; can cancel the action.
394
395
395
-
*[BeforeCellPaste](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.TreeGridEvents-1.html#Syncfusion_Blazor_TreeGrid_TreeGridEvents_1_BeforeCellPaste) : This event is triggered before pasting the copied cell value for each cell, and you can cancel the pasting action for a particular cell or change the value by using this event.
396
+
*[BeforeCellPaste](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.TreeGridEvents-1.html#Syncfusion_Blazor_TreeGrid_TreeGridEvents_1_BeforeCellPaste) : Triggered before pasting each cell; can cancel or modify the value.
396
397
397
-
> To know more, you can refer the [BeforeCopyPaste](https://blazor.syncfusion.com/documentation/treegrid/events#beforecopypaste) and [BeforeCellPaste](https://blazor.syncfusion.com/documentation/treegrid/events#beforecellpaste) events.
Copy file name to clipboardExpand all lines: blazor/treegrid/context-menu.md
+30-30Lines changed: 30 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,37 +1,37 @@
1
1
---
2
2
layout: post
3
3
title: Context Menu in Blazor TreeGrid Component | Syncfusion
4
-
description: Checkout and learn here all about context menu in Syncfusion Blazor TreeGrid component and much more.
4
+
description: Learn how to enable and customize context menu options in the Syncfusion Blazor TreeGrid component and much more.
5
5
platform: Blazor
6
-
control: Tree Grid
6
+
control: TreeGrid
7
7
documentation: ug
8
8
---
9
9
10
-
# Context Menu in Blazor TreeGrid Component
11
-
12
-
The Tree Grid has options to show the context menu when right clicked on it. To enable this feature, define either default or custom item in the [ContextMenuItems](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.SfTreeGrid-1.html#Syncfusion_Blazor_TreeGrid_SfTreeGrid_1_ContextMenuItems) property.
13
-
14
-
The following table lists the default context menu items,
15
-
16
-
Items |Description
17
-
-----|-----
18
-
`AutoFit` | Auto fit the current column.
19
-
`AutoFitAll` | Auto fit all columns.
20
-
`Edit` | Edit the current record.
21
-
`Delete` | Delete the current record.
22
-
`Save` | Save the edited record.
23
-
`Cancel` | Cancel the edited state.
24
-
`Copy` | Copy the selected records.
25
-
`PdfExport` | Export the Tree Grid data as Pdf document.
26
-
`ExcelExport` | Export the Tree Grid data as Excel document.
27
-
`CsvExport` | Export the Tree Grid data as CSV document.
28
-
`SortAscending` | Sort the current column in ascending order.
29
-
`SortDescending` | Sort the current column in descending order.
30
-
`FirstPage` | Go to the first page.
31
-
`PrevPage` | Go to the previous page.
32
-
`LastPage` | Go to the last page.
33
-
`NextPage` | Go to the next page.
34
-
`AddRow` | Add new row to the Tree Grid.
10
+
# Context Menu in Syncfusion Blazor TreeGrid Component
11
+
12
+
The TreeGrid supports displaying a context menu on right-click. To enable this feature, define default or custom items using the [ContextMenuItems](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.SfTreeGrid-1.html#Syncfusion_Blazor_TreeGrid_SfTreeGrid_1_ContextMenuItems) property.
13
+
14
+
## Default Context Menu Items
15
+
16
+
| Item |Description|
17
+
|------|-------------|
18
+
|`AutoFit`| Auto fit the current column|
19
+
|`AutoFitAll`| Auto fit all columns|
20
+
|`Edit`| Edit the current record|
21
+
|`Delete`| Delete the current record|
22
+
|`Save`| Save the edited record|
23
+
|`Cancel`| Cancel the edited state|
24
+
|`Copy`| Copy the selected records|
25
+
|`PdfExport`| Export TreeGrid data as PDF |
26
+
|`ExcelExport`| Export TreeGrid data as Excel |
27
+
|`CsvExport`| Export TreeGrid data as CSV |
28
+
|`SortAscending`| Sort the current column in ascending order|
29
+
|`SortDescending`| Sort the current column in descending order|
30
+
|`FirstPage`|Navigate to the first page|
31
+
|`PrevPage`|Navigate to the previous page|
32
+
|`LastPage`|Navigate to the last page|
33
+
|`NextPage`|Navigate to the next page|
34
+
|`AddRow`| Add a new row to the TreeGrid |
35
35
36
36
The following sample code demonstrates enabling context menu with its default items,
37
37
@@ -60,7 +60,7 @@ The following sample code demonstrates enabling context menu with its default it
60
60
public int Progress { get; set; }
61
61
public string Priority { get; set; }
62
62
public int? ParentId { get; set; }
63
-
public Boolean Approved { get; set; }
63
+
public bool Approved { get; set; }
64
64
}
65
65
66
66
public List<BusinessObject> TreeData = new List<BusinessObject>();
@@ -82,9 +82,9 @@ The following sample code demonstrates enabling context menu with its default it
82
82
83
83

84
84
85
-
## Custom context menu items
85
+
## Custom Context Menu Items
86
86
87
-
The custom context menu items can be added by defining the [ContextMenuItems](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.SfTreeGrid-1.html#Syncfusion_Blazor_TreeGrid_SfTreeGrid_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.TreeGrid.TreeGridEvents-1.html#Syncfusion_Blazor_TreeGrid_TreeGridEvents_1_ContextMenuItemClicked) event.
87
+
Add custom context menu items by setting [ContextMenuItems](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.SfTreeGrid-1.html#Syncfusion_Blazor_TreeGrid_SfTreeGrid_1_ContextMenuItems)to a collection of [ContextMenuItemModel](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.ContextMenuItemModel.html) objects, and handle their actions in the [ContextMenuItemClicked](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.TreeGridEvents-1.html#Syncfusion_Blazor_TreeGrid_TreeGridEvents_1_ContextMenuItemClicked) event.
88
88
89
89
The following sample code demonstrates defining custom context menu item and its corresponding action in the [ContextMenuItemClicked](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.TreeGridEvents-1.html#Syncfusion_Blazor_TreeGrid_TreeGridEvents_1_ContextMenuItemClicked) event,
Copy file name to clipboardExpand all lines: blazor/treegrid/custom-binding.md
+14-16Lines changed: 14 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,21 @@
1
1
---
2
2
layout: post
3
3
title: Custom Binding in Blazor TreeGrid Component | Syncfusion
4
-
description: Checkout and learn here all about custom binding in Syncfusion Blazor TreeGrid component and much more.
4
+
description: Learn how to implement custom data binding and CRUD operations in the Syncfusion Blazor TreeGrid component and much more.
5
5
platform: Blazor
6
-
control: Tree Grid
6
+
control: TreeGrid
7
7
documentation: ug
8
8
---
9
9
10
10
# Custom Binding in Blazor TreeGrid Component
11
11
12
-
The [SfDataManager](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Data.SfDataManager.html)has custom adaptor support which allows to perform manual operations on the data. This can be utilized for implementing custom data binding and editing operations in the Tree Grid component.
12
+
The [SfDataManager](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Data.SfDataManager.html)supports custom adaptors that allow manual operations on data. This enables custom data binding and editing in the TreeGrid component.
13
13
14
-
N> Only [Self-Referential type data](https://blazor.syncfusion.com/documentation/treegrid/data-binding#self-referential-data-bindingflat-data) is supported with custom binding in tree grid
14
+
N> Only [Self-Referential type data](https://blazor.syncfusion.com/documentation/treegrid/data-binding#self-referential-data-bindingflat-data) is supported with custom binding in TreeGrid.
15
15
16
-
For implementing custom data binding in the Tree Grid, the **DataAdaptor** class is used. This abstract class acts as a base class for the custom adaptor.
16
+
For implementing custom data binding in the TreeGrid, the **DataAdaptor** class is used. This abstract class acts as a base class for the custom adaptor.
17
17
18
-
The **DataAdaptor** abstract class has both synchronous and asynchronous method signatures which can be overridden in the custom adaptor. Following are the method signatures present in this class,
18
+
The **DataAdaptor** abstract class provides both synchronous and asynchronous method signatures for custom data operations.
19
19
20
20
```csharp
21
21
publicabstractclassDataAdaptor
@@ -71,9 +71,9 @@ public abstract class DataAdaptor
71
71
}
72
72
```
73
73
74
-
## Data binding
74
+
## Data Binding
75
75
76
-
The custom data binding can be performed in the Tree Grid component by providing the custom adaptor classand overriding the **Read** or **ReadAsync** method of the **DataAdaptor** abstract class.
76
+
The custom data binding can be performed in the TreeGrid component by providing the custom adaptor classand overriding the **Read** or **ReadAsync** method of the **DataAdaptor** abstract class.
77
77
78
78
The following sample code demonstrates implementing custom data binding using custom adaptor,
79
79
@@ -213,11 +213,9 @@ public class SelfReferenceData
213
213
N>Ifthe**DataManagerRequest.RequiresCounts**valueis**true**, thentheRead/ReadAsyncreturnvaluemustbeof**DataResult**withproperties**Result**whosevalueisacollectionofrecordsand**Count** whosevalueisthetotalnumberofrecords. Ifthe **DataManagerRequest.RequiresCounts** is **false**, thensimplysendthecollectionofrecords.
@@ -294,13 +292,13 @@ The following sample code demonstrates injecting service into Custom Adaptor,
294
292
295
293
Custom Adaptor can be created as a component when `DataAdaptor` is extended from `OwningComponentBase`. Custom Adaptor can be created from any of the two versions of the class, `DataAdaptor` and `DataAdaptor<T>`.
296
294
297
-
Ensure to register your service in **Startup.cs** file.
title: Styling and Appearance in Blazor TreeGrid Component | Syncfusion
4
-
description: Checkout and learn here all about Styling and Appearance in Syncfusion Blazor TreeGrid component and more.
4
+
description: Learn how to customize the styling and appearance of the Syncfusion Blazor TreeGrid component using CSS classes.
5
5
platform: Blazor
6
-
control: Tree Grid
6
+
control: TreeGrid
7
7
documentation: ug
8
8
---
9
9
10
10
# Styling and Appearance in Blazor TreeGrid Component
11
11
12
-
To modify the Tree Grid appearance, override the default CSS of Tree Grid. Find the list of CSS classes and its corresponding section in Tree Grid.
12
+
To modify the appearance of the TreeGrid, override its default CSS styles. Below is a categorized list of CSS classes and their corresponding sections in the TreeGrid.
13
13
14
-
| Section |CSS class | Purpose of CSS class|
15
-
|-----|-----|-----|
16
-
|**Root**|e-treegrid| This classes are in this root element div of the Tree Grid control.|
17
-
|**Header**|e-gridheader| This class is added in the root element of header element. In this class, thin line between header and content of the Tree Grid can be overridden.|
18
-
||e-table| This class is added at the **table** of the Tree Grid header. This CSS class makes tablewidth as 100 %.|
19
-
||e-columnheader| This class is added at **tr** of the Tree Grid header.|
20
-
||e-headercell| This class is added in **th** element of Tree Grid header. The background color of header and border color can be overridden.|
21
-
|| e-headercelldiv | This class is added in div which is present in **th** element in the header. Use the e-headercelldiv to override skeleton of header.|
22
-
|**Body**|e-gridcontent| This class is added at root of the body content. This is to override background color of the body.|
23
-
||e-table| This class is added to table of the content. This CSS class makes tablewidth as 100 %.|
24
-
||e-altrow| This class is added to the alternate rows of Tree Grid. This is to override alternate row color of the Tree Grid.|
25
-
||e-rowcell| This class is added to all cells in the Tree Grid. This is to override cells appearance and styling.|
26
-
||e-groupcaption| This class is added to the **td** of group caption which is to change the background color of caption cell.|
27
-
||e-selectionbackground |This class is added to rowcell's of the Tree Grid. This is override selection.|
28
-
||e-hover| This class adds to row of Tree Grid, while hovering the Tree Grid rows.|
29
-
|**Pager**|e-pager| This class is added to root element of the pager. This is to change appearance of the background color and color of font.|
30
-
||e-pagercontainer| This class is added to numeric items of the pager.|
31
-
||e-parentmsgbar| This class is added to pager info of the pager.|
32
-
|**Summary**| e-gridfooter| This class is added to root of the summary div.|
33
-
||e-summaryrow| This class is added to rows of Tree Grid summary.|
34
-
||e-summarycell| This class is added to cells of summary row. This to override background color of summary.|
0 commit comments