Search results

Work in offline mode

On binding data through remote services, request will be sent to the server-side for every query. To avoid post back to server, you can set the EjsDataManager to load all the data on initialization itself and make the query processing in client-side. This behavior can be enabled by using Offline property of the EjsDataManager.

The following sample code demonstrates enabling offline mode for the EjsDataManager which is bound with the Grid component,

@using Syncfusion.EJ2.Blazor
@using Syncfusion.EJ2.Blazor.Data
@using Syncfusion.EJ2.Blazor.Grids

<EjsGrid TValue="EmployeeData" ID="Grid" AllowPaging="true">
  <EjsDataManager Url="" Adaptor="Adaptors.ODataAdaptor" Offline="true"></EjsDataManager>
    <GridColumn Field=@nameof(EmployeeData.OrderID) TextAlign="TextAlign.Center" HeaderText="Order ID" Width="120"></GridColumn>
    <GridColumn Field=@nameof(EmployeeData.CustomerID) TextAlign="TextAlign.Center" HeaderText="Customer Name" Width="130"></GridColumn>
    <GridColumn Field=@nameof(EmployeeData.EmployeeID) TextAlign="TextAlign.Center" HeaderText="Employee ID" Width="120"></GridColumn>

  public class EmployeeData
    public int OrderID { get; set; }
    public string CustomerID { get; set; }
    public int EmployeeID { get; set; }