Skip to content

Commit d3fbdea

Browse files
994112: Updated the UG content and samples for Blazor DataManger Component
1 parent b87d49a commit d3fbdea

File tree

2 files changed

+129
-86
lines changed

2 files changed

+129
-86
lines changed

blazor/data/getting-started-with-web-app.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ documentation: ug
99

1010
# Getting Started with Blazor DataManager Component in Web App
1111

12-
The Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor [DataManager](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Data.SfDataManager.html) component acts as a data gateway for Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor controls that support data binding. It enables interaction with **local** or **remote** data sources using **queries** and **adaptors**. This guide provides step-by-step instructions to configure the component in a **Blazor Web App** created with [Visual Studio](https://visualstudio.microsoft.com/vs/) or **Visual Studio Code**.
12+
The Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor [DataManager](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Data.SfDataManager.html) component acts as a data gateway for Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor controls that support data binding. It enables interaction with **local** or **remote** data sources using **queries** and **adaptors**. This guide provides step-by-step instructions to configure the component in a **Blazor Web App** created with [Visual Studio](https://visualstudio.microsoft.com/vs/) or [Visual Studio Code](https://code.visualstudio.com/).
1313

1414
{% tabcontents %}
1515

@@ -27,7 +27,7 @@ A **Blazor Web App** can be created using **Visual Studio** with the built-in [M
2727
2. Select **Create a new project**.
2828
3. Choose **Blazor Web App** from the template list and click **Next**.
2929
4. Specify the **project name**, **location**, and **solution settings**, then click **Next**.
30-
5. Select the **target framework** as **.NET 8.0 or later** (choose the latest installed version).
30+
5. Select the **target framework** as **.NET 9.0 or later** (choose the latest installed version).
3131
6. Choose the [Interactive render mode](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-10.0#render-modes)(Server, WebAssembly, or Auto) and [Interactivity location](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-10.0&pivots=vs).
3232
7. Review the remaining options and click **Create** to generate the project.
3333

@@ -71,7 +71,7 @@ N> Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components are availa
7171

7272
A **Blazor Web App** can be created using **Visual Studio Code** with the built-in [Microsoft templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-10.0&pivots=vsc) or the [Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-code-integration/create-project).
7373

74-
1. Install the latest **.NET SDK** that supports **.NET 8 or later**.
74+
1. Install the latest **.NET SDK** that supports **.NET 9 or later**.
7575
2. Open **Visual Studio Code** and launch the integrated terminal (**Ctrl + `**).
7676
3. Execute the following command to create a **Blazor Web App** with **Auto** [Interactive render mode](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-10.0#render-modes):
7777

@@ -313,7 +313,7 @@ Remote data can be bound by setting the [Url](https://help.syncfusion.com/cr/bla
313313

314314
## Component binding
315315

316-
The [SfDataManager](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Data.SfDataManager.html) component can be used with Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components that support data binding.
316+
The Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor [DataManager](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Data.SfDataManager.html) component can be integrated with any Syncfusion<sup style="font-size:70%">&reg;</sup> data-bound component to manage local or remote data operations.
317317

318318
This configuration demonstrates how the `DataManager` is bound to the [SfDropDownList](https://blazor.syncfusion.com/documentation/dropdown-list/getting-started) component to enable consistent interaction with local or remote data sources.
319319

@@ -324,34 +324,34 @@ Local data can be bound to components such as `SfDropDownList` by assigning a co
324324
{% tabs %}
325325
{% highlight razor %}
326326

327+
@using Syncfusion.Blazor.Data
327328
@using Syncfusion.Blazor.DropDowns
328329

329-
<SfDropDownList Placeholder="e.g. Australia" TItem="Countries" TValue="string">
330-
<SfDataManager Json=@Country></SfDataManager>
330+
<SfDropDownList Placeholder="e.g. Australia" TItem="Country" TValue="string">
331+
<SfDataManager Json="@Countries"></SfDataManager>
331332
<DropDownListFieldSettings Value="Name"></DropDownListFieldSettings>
332333
</SfDropDownList>
333334

334-
@code{
335-
public class Countries
335+
@code {
336+
public class Country
336337
{
337-
public string Name { get; set; }
338-
339-
public string Code { get; set; }
338+
public string? Name { get; set; }
339+
public string? Code { get; set; }
340340
}
341341

342-
public Countries[] Country = new Countries[]
342+
public List<Country> Countries = new()
343343
{
344-
new Countries { Name = "Australia", Code = "AU" },
345-
new Countries { Name = "Bermuda", Code = "BM" },
346-
new Countries { Name = "Canada", Code = "CA" },
347-
new Countries { Name = "Cameroon", Code = "CM" }
344+
new Country { Name = "Australia", Code = "AU" },
345+
new Country { Name = "Bermuda", Code = "BM" },
346+
new Country { Name = "Canada", Code = "CA" },
347+
new Country { Name = "Cameroon", Code = "CM" }
348348
};
349349
}
350350

351351
{% endhighlight %}
352352
{% endtabs %}
353353

354-
{% previewsample "https://blazorplayground.syncfusion.com/embed/rZLztCVEBpQxSKZU?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" backgroundimage "[Binding DropDownList Item in Blazor DataManager Component](./images/blazor-datamanager-binding-dropdown-item.png)" %}
354+
{% previewsample "https://blazorplayground.syncfusion.com/embed/BZLeCWWaPtlNQoPM?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" backgroundimage "[Binding DropDownList Item in Blazor DataManager Component](./images/blazor-datamanager-binding-dropdown-item.png)" %}
355355

356356
### Remote data binding
357357

0 commit comments

Comments
 (0)