Hi SyncFusion,
I am build a blazor app using a grid. To simplify my problem I have reduced my problem to different examples you provide.
The selection of a grid row and/or cell doesn't work together with Remote data and search specific column.
For my simplified example I have used:
- https://ej2.syncfusion.com/blazor/documentation/grid/data-binding/#binding-with-odata-v4-services
- https://ej2.syncfusion.com/blazor/documentation/grid/searching/#search-specific-columns
- https://ej2.syncfusion.com/blazor/documentation/grid/selection/
My example, which doesn't work:
@using Syncfusion.EJ2.Blazor.Data
@using Syncfusion.EJ2.Blazor.Grids
<EjsGrid TValue="Order" ModelType="@GridOrder" AllowPaging="true" Height="300" Width="650"
AllowSelection="true" Toolbar="@(new List<string>() { "Search" })">
<EjsDataManager Url="https://services.odata.org/V4/Northwind/Northwind.svc/Orders/" Adaptor="Adaptors.ODataV4Adaptor"></EjsDataManager>
<GridSearchSettings Fields="@(new string[] { "OrderID", "CustomerId" })"></GridSearchSettings>
<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="yMd" 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 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 Order GridOrderModel { get; set; }
public class Order
{
public int? OrderID { get; set; }
public string CustomerID { get; set; }
public DateTime? OrderDate { get; set; }
public double? Freight { get; set; }
}
}
Update: I am using .NET Core 3.1 Blazor Server and Syncfusion.EJ2.Blazor Version 17.3.0.29-beta
Thank you very much
Kind regards
Pascal
PS: There was a display error to my example code