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
The Syncfusion<supstyle="font-size:70%">®</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.
158
158
@@ -355,9 +355,6 @@ The [ReorderColumnsAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazo
355
355
| fromFieldNames | List<string>| Field names of the columns to be moved. |
356
356
| toFieldName | string | Field name of the column before which the group should be placed. |
357
357
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**.
Copy file name to clipboardExpand all lines: blazor/datagrid/column-resizing.md
+3-10Lines changed: 3 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -345,19 +345,12 @@ To resize a column:
345
345
346
346

347
347
348
-
## Resize columns programmatically
348
+
## Resize columns via programmatically
349
349
350
350
The Syncfusion<supstyle="font-size:70%">®</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.
351
351
352
352
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.
353
353
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
-
361
354
{% tabs %}
362
355
{% highlight razor tabtitle="Index.razor" %}
363
356
@using Syncfusion.Blazor.Grids
@@ -476,9 +469,9 @@ public class OrderDetails
476
469
477
470
The Syncfusion<supstyle="font-size:70%">®</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.
478
471
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.
480
473
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.
0 commit comments