Skip to content

Commit e0f73b0

Browse files
991769: Updated the UG content and samples for Editing in Blazor DataGrid
1 parent 3cdade8 commit e0f73b0

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

blazor/datagrid/command-column-editing.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,10 @@ documentation: ug
99

1010
# Command column editing in Blazor DataGrid
1111

12-
The command column editing feature enables CRUD (Create, Read, Update, and Delete) action buttons in a column to perform operations on individual rows. This approach is useful for inline editing, deletion, or saving changes directly within the Grid.
12+
The Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor DataGrid supports command column editing, which enables CRUD (Create, Read, Update, Delete) action buttons within a column to perform operations on individual rows. This approach is suitable for inline editing, deletion, or saving changes directly within the Grid.
1313

14-
To enable command column editing, use the [GridColumn.Commands](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridColumn.html#Syncfusion_Blazor_Grids_GridColumn_Commands) property. This property allows you to define which command buttons—such as Edit, Delete, Save, and Cancelshould appear in the command column.
14+
To enable command column editing, configure the [GridColumn.Commands](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridColumn.html#Syncfusion_Blazor_Grids_GridColumn_Commands) property. This property defines which command buttons **Edit**, **Delete**, **Save**, and **Cancel** should appear in the command column.
1515

16-
The available built-in command buttons are:
17-
18-
The available built-in command buttons:
1916

2017
| Command Button | Action |
2118
|---------------|-----------------------------|
@@ -24,7 +21,7 @@ The available built-in command buttons:
2421
| Save | Update the edited row. |
2522
| Cancel | Cancel the edit operation. |
2623

27-
The following example demonstrates how to add CRUD action buttons in a column using the [GridCommandColumns](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridCommandColumns.html) property:
24+
In this configuration, the [GridCommandColumns](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridCommandColumns.html) property is used to display all four command buttons in the Manage Records column.
2825

2926
{% tabs %}
3027
{% highlight razor tabtitle="Index.razor" %}
@@ -101,12 +98,10 @@ public class OrderDetails
10198

10299
## Custom command column
103100

104-
The custom command column feature in the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor DataGrid enables the addition of custom command buttons in a column to perform specific actions on individual rows. This feature is useful for implementing customized functionality such as editing, deleting, or executing other operations on a row.
101+
The Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor DataGrid supports adding custom command buttons in a column to perform specific actions on individual rows. This feature is suitable for implementing customized functionality such as editing, deleting, or executing other operations.
105102

106103
To add custom command buttons, configure the [GridColumn.Commands](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridColumn.html#Syncfusion_Blazor_Grids_GridColumn_Commands) property. Define the actions for these buttons using the [CommandClicked](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridEvents-1.html#Syncfusion_Blazor_Grids_GridEvents_1_CommandClicked) event.
107104

108-
The following example demonstrates how to add custom command buttons using the [GridCommandColumns](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridCommandColumns.html) property and configure the `CommandClicked` event to display Grid details in a dialog:
109-
110105
{% tabs %}
111106
{% highlight razor tabtitle="Index.razor" %}
112107
@using Syncfusion.Blazor.Grids
@@ -210,14 +205,16 @@ public class OrderDetails
210205
211206
## Hide command column button in specific records
212207

213-
In the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor DataGrid, command columns are used to perform CRUD operations on records, such as editing or deleting. In certain scenarios, command buttons must be hidden for specific records based on defined conditions. This behavior can be achieved using the [RowDataBound](https://blazor.syncfusion.com/documentation/datagrid/events#rowdatabound) event, which is triggered whenever a row is created or updated in the Grid.
208+
The Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor DataGrid supports conditionally hiding command buttons for specific records based on defined criteria. This is useful when certain actions such as delete or update should be restricted depending on the record's state.
209+
210+
To implement this behavior, use the [RowDataBound](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridEvents-1.html#Syncfusion_Blazor_Grids_GridEvents_1_RowDataBound) event, which is triggered whenever a row is created or updated in the Grid.
214211

215-
The following steps demonstrate how to conditionally hide command buttons:
212+
The following steps outline how to conditionally hide command buttons:
216213

217-
* Use the `RowDataBound` event of the Grid to access each row's data during rendering.
214+
* Use the `RowDataBound` event to access each row's data during rendering.
218215
* Check the value of the **Verified** column for the current record.
219216
* If the **Verified** value is **false**, display only the **Edit** button; otherwise, display the **Delete** button.
220-
* To hide buttons, apply a CSS class to the row using the `addClass` method inside the `RowDataBound` event based on the record condition. Define corresponding CSS rules to apply the style to the respective command buttons.
217+
* To hide buttons, apply a CSS class to the row using the **addClass** method inside the `RowDataBound` event based on the record condition. Define corresponding CSS rules to apply the style to the respective command buttons.
221218

222219
{% tabs %}
223220
{% highlight razor tabtitle="Index.razor" %}

0 commit comments

Comments
 (0)