Skip to content

Commit a98cdb7

Browse files
authored
Merge pull request #6671 from syncfusion-content/983239-HowTo1
983239: How-To files updated in Blazor document
2 parents 92d9c0e + f8817ac commit a98cdb7

5 files changed

+35
-34
lines changed

blazor/treegrid/how-to/access-public-methods.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
22
layout: post
3-
title: Access public methods in Blazor TreeGrid Component | Syncfusion
4-
description: Learn here all about accessing public methods in Tree Grid in Syncfusion Blazor TreeGrid component and more.
3+
title: Access Public Methods in Blazor TreeGrid Component | Syncfusion
4+
description: Learn how to access and invoke public methods of the Syncfusion Blazor TreeGrid by using a component reference, including a Print example.
55
platform: Blazor
6-
control: Tree Grid
6+
control: TreeGrid
77
documentation: ug
88
---
99

10-
# Access public methods in Tree Grid in Blazor TreeGrid Component
10+
# Access Public Methods in Syncfusion Blazor TreeGrid Component
1111

12-
The public methods available in the Tree Grid component can be accessed by using its reference defined in the component initialization.
12+
Public methods of the TreeGrid component can be accessed by using the component reference defined during initialization.
1313

14-
This is demonstrated in the below sample code where the [PrintAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.SfTreeGrid-1.html#Syncfusion_Blazor_TreeGrid_SfTreeGrid_1_PrintAsync) method of the Tree Grid component is invoked on button click using the Tree Grid reference,
14+
The following example shows how to invoke the [PrintAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.SfTreeGrid-1.html#Syncfusion_Blazor_TreeGrid_SfTreeGrid_1_PrintAsync) method on button click using the TreeGrid reference.
1515

1616
{% tabs %}
1717

@@ -87,4 +87,4 @@ public class TreeData
8787

8888
{% endtabs %}
8989

90-
N> Similarly all the public methods of the Tree Grid can be invoked. The available public methods can be found in this [link](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.SfTreeGrid-1.html).
90+
N> All public methods of the TreeGrid can be invoked similarly through the component reference. For the complete list of public methods, see the [TreeGrid public API](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.SfTreeGrid-1.html).

blazor/treegrid/how-to/calculate-column-value-based-on-other-columns.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
22
layout: post
3-
title: Calculate column value in Blazor TreeGrid | Syncfusion
4-
description: Learn here all about how to calculate column value based on other columns in Syncfusion Blazor TreeGrid component and more.
3+
title: Calculate Column Value in Blazor TreeGrid | Syncfusion
4+
description: Learn how to calculate column value from other columns in the Syncfusion Blazor TreeGrid using column templates and the row context.
55
platform: Blazor
6-
control: Tree Grid
6+
control: TreeGrid
77
documentation: ug
88
---
99

1010
# Calculate column value based on other columns in Blazor TreeGrid
1111

12-
The values for a Tree Grid column can be calculated based on other column values by using the **context** parameter in the [Template](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.TreeGridColumn.html#Syncfusion_Blazor_TreeGrid_TreeGridColumn_Template) property of the [TreeGridColumn](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.TreeGridColumn.html) component. Inside the [Template](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.TreeGridColumn.html#Syncfusion_Blazor_TreeGrid_TreeGridColumn_Template), the column values can be accessed using the implicit named parameter **context** and then calculate the values for the new column as required.
12+
A TreeGrid column value can be calculated from other column values by using the **context** parameter in the [Template](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.TreeGridColumn.html#Syncfusion_Blazor_TreeGrid_TreeGridColumn_Template) of the [TreeGridColumn](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.TreeGridColumn.html) component. Inside the [Template](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.TreeGridColumn.html#Syncfusion_Blazor_TreeGrid_TreeGridColumn_Template), access the current row via the implicit context parameter and compute the value for the new column as needed.
1313

14-
This is demonstrated in the following sample code where the value for **Resources** column is calculated based on the values of **Duration** and **Progress** columns.
14+
The following example calculates the value of the **Resources** column based on the values of the **Duration** and **Progress** columns.
1515

1616
{% tabs %}
1717

blazor/treegrid/how-to/change-data-source-dynamically.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
22
layout: post
3-
title: Change datasource dynamically in Blazor TreeGrid | Syncfusion
4-
description: Learn here all about how to change datasource dynamically in Syncfusion Blazor TreeGrid component and more.
3+
title: Change DataSource Dynamically in Blazor TreeGrid | Syncfusion
4+
description: Learn how to change the TreeGrid data source dynamically at runtime using a bound property and an external button.
55
platform: Blazor
6-
control: Tree Grid
6+
control: TreeGrid
77
documentation: ug
88
---
99

10-
# Change datasource dynamically in Blazor TreeGrid Component
10+
# Change DataSource Dynamically in Syncfusion Blazor TreeGrid
1111

12-
The [DataSource](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.SfTreeGrid-1.html#Syncfusion_Blazor_TreeGrid_SfTreeGrid_1_DataSource) of the Tree Grid component can be changed dynamically through an external button.
12+
The [DataSource](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.SfTreeGrid-1.html#Syncfusion_Blazor_TreeGrid_SfTreeGrid_1_DataSource) of the TreeGrid component can be changed dynamically using an external button.
1313

14-
This is demonstrated in the below sample code where the [DataSource](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.SfTreeGrid-1.html#Syncfusion_Blazor_TreeGrid_SfTreeGrid_1_DataSource) is dynamically modified using the bounded property.
14+
The following example demonstrates changing the [DataSource](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.SfTreeGrid-1.html#Syncfusion_Blazor_TreeGrid_SfTreeGrid_1_DataSource) at runtime through a bound property.
1515

1616
{% tabs %}
1717

blazor/treegrid/how-to/custom-control-in-treegrid-toolbar.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
---
22
layout: post
33
title: Custom control in Blazor TreeGrid Toolbar | Syncfusion
4-
description: Learn here all about Custom control in Tree Grid toolbar in Syncfusion Blazor TreeGrid component and more.
4+
description: Learn how to integrate custom controls like Autocomplete into the Tree Grid toolbar in Syncfusion Blazor TreeGrid component.
55
platform: Blazor
6-
control: Tree Grid
6+
control: TreeGrid
77
documentation: ug
88
---
99

10-
# Custom control in Tree Grid toolbar in Blazor TreeGrid Component
10+
# Custom control in Syncfusion Blazor TreeGrid Toolbar
1111

12-
The custom controls can be rendered inside the Tree Grid's toolbar area. This can be achieved by initializing the custom controls within the Template property of the Toolbar component. This toolbar component is defined inside the Tree Grid component.
12+
You can integrate custom controls within the toolbar area of the Tree Grid component. This is accomplished by initializing the desired control inside the `Template` property of the `Toolbar` component, which is nested within the TreeGrid.
1313

14-
This is demonstrated in the below sample code where Autocomplete component is rendered inside the Tree Grid's toolbar and is used for performing search operation on the Tree Grid.
14+
The following example demonstrates how to render an `SfAutoComplete` control inside the TreeGrid's toolbar to enable search functionality.
1515

1616
{% tabs %}
1717

1818
{% highlight razor %}
1919

2020
@using TreeGridComponent.Data;
21-
@using Syncfusion.Blazor.Grids;
22-
@using Syncfusion.Blazor.TreeGrid;
21+
@using Syncfusion.Blazor.Grids;
22+
@using Syncfusion.Blazor.TreeGrid;
2323
@using Syncfusion.Blazor.DropDowns;
2424
@using Syncfusion.Blazor.Navigations;
2525

@@ -118,4 +118,4 @@ public class TreeData
118118

119119
{% endtabs %}
120120

121-
![Custom Control in Blazor TreeGrid Toolbar](../images/blazor-treegrid-custom-control-in-toolbar.gif)
121+
![Custom Control in Blazor TreeGrid Toolbar](../images/blazor-treegrid-custom-control-in-toolbar.gif)

blazor/treegrid/how-to/custom-toolbar-items-with-text-name-same-as-default-toolbar-items.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
---
22
layout: post
33
title: Custom toolbar items in Blazor TreeGrid Component | Syncfusion
4-
description: Learn here all about custom toolbar items with text name same as default toolbar items in Syncfusion Blazor TreeGrid component and more.
4+
description: Learn how to configure custom toolbar items with identical text to default buttons in Syncfusion Blazor TreeGrid and more.
55
platform: Blazor
6-
control: Tree Grid
6+
control: TreeGrid
77
documentation: ug
88
---
99

1010
# Custom toolbar items in Blazor TreeGrid Component
1111

12-
The Custom toolbar items can be created with text name same as default toolbar items (Add,Edit,Delete,etc.). But while creating them, they will be considered as default toolbar items which will cause some issues while clicking on it. To overcome this behavior, it is suggested to define the **Id** property for custom toolbar items.
12+
Custom toolbar items can be created using text labels identical to default toolbar items such as **Add**, **Edit**, or **Delete**. However, when these items are defined without an explicit `Id`, they are treated as default toolbar items, which may lead to unintended behavior—such as being disabled when certain settings are not configured.
1313

14-
This is demonstrated in the below sample code where there are custom toolbar items with text same as **Add** and **Delete** buttons. These toolbar buttons will be enabled only when TreeGridEditSettings is defined in TreeGrid. So custom toolbar will be in disabled state considering it as default toolbar item. That behavior must be overcame by defining the Id property.
14+
To prevent this issue, it is recommended to define the **Id** property for each custom toolbar item. This ensures that the Tree Grid treats them as distinct from the default toolbar actions.
15+
16+
The following example demonstrates how to define custom toolbar items with the same text as default buttons, and how to handle their click events appropriately.
1517

1618
{% tabs %}
1719

1820
{% highlight razor %}
1921

2022
@using TreeGridComponent.Data;
21-
@using Syncfusion.Blazor.Grids;
22-
@using Syncfusion.Blazor.TreeGrid;
23-
23+
@using Syncfusion.Blazor.Grids;
24+
@using Syncfusion.Blazor.TreeGrid;
2425
@{
2526
List<Syncfusion.Blazor.Navigations.ItemModel> Toolbaritems = new List<Syncfusion.Blazor.Navigations.ItemModel>();
2627
Toolbaritems.Add(new Syncfusion.Blazor.Navigations.ItemModel() { Text = "Add", Id = "add", TooltipText = "Add Record", PrefixIcon = "add" });
@@ -32,7 +33,7 @@ This is demonstrated in the below sample code where there are custom toolbar ite
3233
<TreeGridColumns>
3334
<TreeGridColumn Field="TaskId" HeaderText="Task ID" IsPrimaryKey="true" Width="70" TextAlign="TextAlign.Right"></TreeGridColumn>
3435
<TreeGridColumn Field="TaskName" HeaderText="Task Name" Width="85"></TreeGridColumn>
35-
<TreeGridColumn Field="Duration" HeaderText="Duation" Width="70" TextAlign="TextAlign.Right"></TreeGridColumn>
36+
<TreeGridColumn Field="Duration" HeaderText="Duration" Width="70" TextAlign="TextAlign.Right"></TreeGridColumn>
3637
<TreeGridColumn Field="Progress" HeaderText="Progress" Width="70" TextAlign="TextAlign.Right"></TreeGridColumn>
3738
<TreeGridColumn Field="Priority" HeaderText="Priority" Width="70"></TreeGridColumn>
3839
</TreeGridColumns>

0 commit comments

Comments
 (0)