Skip to content

Commit ae253de

Browse files
994112: Updated the UG content and samples for Blazor DataManger Component
1 parent 36e4477 commit ae253de

File tree

1 file changed

+27
-12
lines changed

1 file changed

+27
-12
lines changed

blazor/data/how-to/offline-mode.md

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: post
3-
title: Working in offline mode in Blazor DataManager Component | Syncfusion
4-
description: Checkout and learn here all about working in offline mode in Syncfusion Blazor DataManager component and more.
3+
title: Working in Offline Mode in Blazor DataManager | Syncfusion
4+
description: Learn how to enable offline mode in Syncfusion® Blazor DataManager to process queries locally without additional server requests.
55
platform: Blazor
66
control: DataManager
77
documentation: ug
@@ -11,25 +11,40 @@ documentation: ug
1111

1212
# Working in Offline Mode in Blazor DataManager Component
1313

14-
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 [SfDataManager](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Data.SfDataManager.html) to load all the data on initialization itself and make the query processing in client-side. This behavior can be enabled by using [Offline](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DataManager.html#Syncfusion_Blazor_DataManager_Offline) property of the [SfDataManager](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Data.SfDataManager.html).
14+
The Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor DataManager component provides **offline mode** to execute query operations on the client without additional server requests. When data is sourced from a remote service, enabling offline mode retrieves the complete collection during initialization and processes all subsequent operations locally. The cached data is maintained in the **Json** property.
1515

16-
The following sample code demonstrates enabling offline mode for the [SfDataManager](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Data.SfDataManager.html) which is bound with the DataGrid component,
16+
To enable offline mode, set the [Offline](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DataManager.html#Syncfusion_Blazor_DataManager_Offline) property to **true** on the [SfDataManager](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Data.SfDataManager.html) component.
17+
18+
## Key benefits of offline mode
19+
20+
Enabling the `Offline` property modifies the behavior of the `DataManager` component in the following ways:
21+
22+
- **Single data load** – Retrieves the complete collection during initialization without additional server requests.
23+
- **Client-side processing** – Executes **filtering**, **sorting**, **paging**, and gro**uping operations in the browser.
24+
- **Improved performance** – Minimizes **network traffic** and enhances responsiveness.
25+
- **Offline functionality** – Maintains query operations even when network connectivity is unavailable.
26+
- **Adaptor compatibility** – Supports **OData**, **Web API**, and **URL adaptors** without requiring extra configuration.
1727

1828
```cshtml
1929
@using Syncfusion.Blazor
2030
@using Syncfusion.Blazor.Data
2131
@using Syncfusion.Blazor.Grids
2232
2333
<SfGrid TValue="EmployeeData" ID="Grid" AllowPaging="true">
24-
<SfDataManager Url="https://js.syncfusion.com/demos/ejServices/Wcf/Northwind.svc/Orders" Adaptor="Adaptors.ODataAdaptor" Offline="true"></SfDataManager>
25-
<GridColumns>
26-
<GridColumn Field=@nameof(EmployeeData.OrderID) TextAlign="TextAlign.Center" HeaderText="Order ID" Width="120"></GridColumn>
27-
<GridColumn Field=@nameof(EmployeeData.CustomerID) TextAlign="TextAlign.Center" HeaderText="Customer Name" Width="130"></GridColumn>
28-
<GridColumn Field=@nameof(EmployeeData.EmployeeID) TextAlign="TextAlign.Center" HeaderText="Employee ID" Width="120"></GridColumn>
29-
</GridColumns>
34+
<SfDataManager
35+
Url="https://js.syncfusion.com/demos/ejServices/Wcf/Northwind.svc/Orders"
36+
Adaptor="Adaptors.ODataAdaptor"
37+
Offline="true">
38+
</SfDataManager>
39+
<GridColumns>
40+
<GridColumn Field="@nameof(EmployeeData.OrderID)" HeaderText="Order ID" Width="120" TextAlign="TextAlign.Center" />
41+
<GridColumn Field="@nameof(EmployeeData.CustomerID)" HeaderText="Customer Name" Width="130" TextAlign="TextAlign.Center" />
42+
<GridColumn Field="@nameof(EmployeeData.EmployeeID)" HeaderText="Employee ID" Width="120" TextAlign="TextAlign.Center" />
43+
</GridColumns>
3044
</SfGrid>
3145
32-
@code{
46+
@code {
47+
3348
public class EmployeeData
3449
{
3550
public int OrderID { get; set; }
@@ -39,4 +54,4 @@ The following sample code demonstrates enabling offline mode for the [SfDataMana
3954
}
4055
```
4156

42-
N> Return the complete list from server-side when using `Offline` property.
57+
N> * Ensure that the remote endpoint returns the full data collection when the `Offline` property is enabled.

0 commit comments

Comments
 (0)