Skip to content

Commit 1d7bb29

Browse files
992126: Updated the UG content and samples for Columns in Blazor DataGrid
1 parent 2245fce commit 1d7bb29

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

blazor/datagrid/column-reorder.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public class OrderDetails
152152

153153
{% previewsample "https://blazorplayground.syncfusion.com/embed/rZBJWLjxrwmYsHAA?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
154154

155-
## Reorder via programmatically
155+
## Reorder columns via programmatically
156156

157157
The Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor DataGrid allows columns to be reordered programmatically using built-in methods. Columns can be moved based on index or field name, enabling dynamic layout control through external UI elements such as buttons.
158158

@@ -355,9 +355,6 @@ The [ReorderColumnsAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazo
355355
| fromFieldNames | List&lt;string&gt; | Field names of the columns to be moved. |
356356
| toFieldName | string | Field name of the column before which the group should be placed. |
357357

358-
359-
In this configuration, the single-column method moves **ShipCity** before **OrderID**, and the multi-column method moves **ShipCity**, **ShipRegion**, and **ShipName** before **OrderID**.
360-
361358
{% tabs %}
362359
{% highlight razor tabtitle="Index.razor" %}
363360
@using Syncfusion.Blazor.Grids

blazor/datagrid/column-resizing.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -345,19 +345,12 @@ To resize a column:
345345

346346
![Blazor DataGrid column resizing in touch interaction.](./images/blazor-datagrid-column-resizing.jpg)
347347

348-
## Resize columns programmatically
348+
## Resize columns via programmatically
349349

350350
The Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor DataGrid supports column resizing through external UI interactions such as dropdowns or buttons. This allows dynamic control over column widths without relying on the Grid’s built-in UI handlers.
351351

352352
To resize a column externally, update the [Width](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridColumn.html#Syncfusion_Blazor_Grids_GridColumn_Width) property of the target [GridColumn](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridColumn.html), and invoke the [RefreshColumnsAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.SfGrid-1.html#Syncfusion_Blazor_Grids_SfGrid_1_RefreshColumnsAsync) method to apply the changes.
353353

354-
In this configuration:
355-
356-
1. The column name is selected using a [DropDownList](https://blazor.syncfusion.com/documentation/dropdown-list/getting-started-with-web-app).
357-
2. The new width is entered in a TextBox.
358-
3. On clicking the Resize button, the [GetColumnByFieldAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.SfGrid-1.html#Syncfusion_Blazor_Grids_SfGrid_1_GetColumnByFieldAsync_System_String_) method retrieves the column reference.
359-
4. The updated width is applied and the Grid is refreshed.
360-
361354
{% tabs %}
362355
{% highlight razor tabtitle="Index.razor" %}
363356
@using Syncfusion.Blazor.Grids
@@ -476,9 +469,9 @@ public class OrderDetails
476469

477470
The Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor DataGrid provides events that are triggered during column resizing operations. These events allow execution of custom logic before and after a column is resized, enabling validation, customization, and UI updates or notifications.
478471

479-
[OnResizeStart](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridEvents-1.html#Syncfusion_Blazor_Grids_GridEvents_1_OnResizeStart): Triggered when column resizing begins.
472+
1. [OnResizeStart](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridEvents-1.html#Syncfusion_Blazor_Grids_GridEvents_1_OnResizeStart): Triggered when column resizing begins.
480473

481-
[ResizeStopped](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridEvents-1.html#Syncfusion_Blazor_Grids_GridEvents_1_ResizeStopped): Triggered when column resizing ends.
474+
2. [ResizeStopped](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridEvents-1.html#Syncfusion_Blazor_Grids_GridEvents_1_ResizeStopped): Triggered when column resizing ends.
482475

483476
### OnResizeStart
484477

0 commit comments

Comments
 (0)