Hi SyncFusion,
I use Blazor Grid in Version 17.4.0.46 (Blazor Server App) and a grid with Row Virtualization, Checkbox Selection and Column Reorder. But the Column Reorder doesn't work properly - the Headers can be changed, but the order of the corresponding values doesn't change.
I have checked following documentation:
https://ej2.syncfusion.com/blazor/documentation/grid/selection/#checkbox-selection
https://ej2.syncfusion.com/blazor/documentation/grid/virtual/#row-virtualization
https://ej2.syncfusion.com/blazor/documentation/grid/columns/#reorder
My short example is:
@page "/test"
@using Syncfusion.EJ2.Blazor.Data
@using Syncfusion.EJ2.Blazor.Grids
<EjsGrid DataSource="@Orders" AllowReordering="true" AllowSelection="true" Height="550" Width="1550" EnableVirtualization="true">
<GridSelectionSettings Type="SelectionType.Multiple"></GridSelectionSettings>
<GridColumns>
<GridColumn Type="ColumnType.CheckBox" Width="50"></GridColumn>
<GridColumn Field=@nameof(Order.OrderID) HeaderText="Order ID" TextAlign="TextAlign.Right" Width="120"></GridColumn>
<GridColumn Field=@nameof(Order.CustomerID) HeaderText="Customer Name" Width="150"></GridColumn>
<GridColumn Field=@nameof(Order.OrderDate) HeaderText="Order Date" Format="d" Type="ColumnType.Date" TextAlign="TextAlign.Right" Width="130"></GridColumn>
<GridColumn Field=@nameof(Order.Freight) HeaderText="Freight" Format="C2" TextAlign="TextAlign.Right" Width="120"></GridColumn>
</GridColumns>
</EjsGrid>
@code{
public List<Order> Orders { get; set; }
protected override void OnInitialized()
{
Orders = Enumerable.Range(1, 75).Select(x => new Order()
{
OrderID = 1000 + x,
CustomerID = (new string[] { "ALFKI", "ANANTR", "ANTON", "BLONP", "BOLID" })[new Random().Next(5)],
Freight = 2.1 * x,
OrderDate = DateTime.Now.AddDays(-x),
}).ToList();
}
public class Order
{
public int? OrderID { get; set; }
public string CustomerID { get; set; }
public DateTime? OrderDate { get; set; }
public double? Freight { get; set; }
}
}
I hope, you can reproduce my problem.
Kind Regards
Pascal