Skip to content

Commit f81caa5

Browse files
Merge pull request #7035 from syncfusion-content/930500-UG
Updated common Getting Started UG documentation for Blazor Web, WASM and Server App
2 parents 3d7a34f + 4717741 commit f81caa5

File tree

4 files changed

+131
-68
lines changed

4 files changed

+131
-68
lines changed

blazor/getting-started/blazor-server-side-visual-studio.md

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

1010
# Getting Started with Blazor Server App
1111

12-
This article provides a step-by-step instructions for building Blazor Server App with `Blazor Calendar` component using [Visual Studio](https://visualstudio.microsoft.com/vs/), Visual Studio Code and .NET CLI.
12+
This article provides a step-by-step instructions for building Blazor Server App with `Blazor DataGrid` component using [Visual Studio](https://visualstudio.microsoft.com/vs/), [Visual Studio Code](https://code.visualstudio.com/) and [.NET CLI](https://learn.microsoft.com/en-us/dotnet/core/tools/).
1313

1414
## Using Playground
1515

16-
[Blazor Playground](https://blazor.syncfusion.com/documentation/blazor-playground/overview) allows you to interact with our Blazor components directly in your web browser without need to install any required NuGet packages. By default, the `Syncfusion.Blazor` package is included in this.
16+
[Blazor Playground](https://blazor.syncfusion.com/documentation/common/playground/getting-started) allows you to interact with our Blazor components directly in your web browser without need to install any required NuGet packages. By default, the `Syncfusion.Blazor` package is included in this.
1717

1818
{% playground "https://blazorplayground.syncfusion.com/" %}
1919

@@ -39,14 +39,14 @@ You need to configure the corresponding [Interactive render mode](https://learn.
3939

4040
![Blazor Server App with Interactive Mode](images/blazor-app-interactive-mode.png)
4141

42-
### Install Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Calendars and Themes NuGet in the App
42+
### Install Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Grid and Themes NuGet in the App
4343

44-
Here's an example of how to add **Blazor Calendar** component in the app, open the NuGet package manager in Visual Studio (*Tools → NuGet Package Manager → Manage NuGet Packages for Solution*), search and install [Syncfusion.Blazor.Calendars](https://www.nuget.org/packages/Syncfusion.Blazor.Calendars/) and [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/). Alternatively, you can utilize the following package manager command to achieve the same.
44+
Here's an example of how to add **Blazor DataGrid** component in the app, open the NuGet package manager in Visual Studio (*Tools → NuGet Package Manager → Manage NuGet Packages for Solution*), search and install [Syncfusion.Blazor.Grid](https://www.nuget.org/packages/Syncfusion.Blazor.Grid/) and [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/). Alternatively, you can utilize the following package manager command to achieve the same.
4545

4646
{% tabs %}
4747
{% highlight C# tabtitle="Package Manager" %}
4848

49-
Install-Package Syncfusion.Blazor.Calendars -Version {{ site.releaseversion }}
49+
Install-Package Syncfusion.Blazor.Grid -Version {{ site.releaseversion }}
5050
Install-Package Syncfusion.Blazor.Themes -Version {{ site.releaseversion }}
5151

5252
{% endhighlight %}
@@ -79,16 +79,16 @@ cd BlazorApp
7979

8080
This command creates new Blazor Server App and places it in a new directory called `BlazorApp` inside your current location. See [Create Blazor app topic](https://dotnet.microsoft.com/en-us/learn/aspnet/blazor-tutorial/create) and [dotnet new command](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-new) topics for more details.
8181

82-
### Install Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Calendars and Themes NuGet in the App
82+
### Install Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Grid and Themes NuGet in the App
8383

8484
* Press <kbd>Ctrl</kbd>+<kbd>`</kbd> to open the integrated terminal in Visual Studio Code.
8585
* Ensure you’re in the project root directory where your `.csproj` file is located.
86-
* Run the following command to install a [Syncfusion.Blazor.Calendars](https://www.nuget.org/packages/Syncfusion.Blazor.Calendars/) and [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/) NuGet package and ensure all dependencies are installed.
86+
* Run the following command to install a [Syncfusion.Blazor.Grid](https://www.nuget.org/packages/Syncfusion.Blazor.Grid/) and [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/) NuGet package and ensure all dependencies are installed.
8787

8888
{% tabs %}
8989
{% highlight c# tabtitle="Package Manager" %}
9090

91-
dotnet add package Syncfusion.Blazor.Calendars -Version {{ site.releaseversion }}
91+
dotnet add package Syncfusion.Blazor.Grid -Version {{ site.releaseversion }}
9292
dotnet add package Syncfusion.Blazor.Themes -Version {{ site.releaseversion }}
9393
dotnet restore
9494

@@ -128,14 +128,14 @@ cd BlazorApp
128128

129129
This command creates new Blazor Server App and places it in a new directory called `BlazorApp` inside your current location. See [Create Blazor app topic](https://dotnet.microsoft.com/en-us/learn/aspnet/blazor-tutorial/create) and [dotnet new CLI command](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-new) topics for more details.
130130

131-
### Install Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Calendars and Themes NuGet in the App
131+
### Install Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Grid and Themes NuGet in the App
132132

133-
Here's an example of how to add **Blazor Calendar** component in the application using the following command in the command prompt (Windows) or terminal (Linux and macOS) to install a [Syncfusion.Blazor.Calendars](https://www.nuget.org/packages/Syncfusion.Blazor.Calendars/) and [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/) NuGet package. See [Install and manage packages using the dotnet CLI](https://learn.microsoft.com/en-us/nuget/consume-packages/install-use-packages-dotnet-cli) topics for more details.
133+
Here's an example of how to add **Blazor DataGrid** component in the application using the following command in the command prompt (Windows) or terminal (Linux and macOS) to install a [Syncfusion.Blazor.Grid](https://www.nuget.org/packages/Syncfusion.Blazor.Grid/) and [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/) NuGet package. See [Install and manage packages using the dotnet CLI](https://learn.microsoft.com/en-us/nuget/consume-packages/install-use-packages-dotnet-cli) topics for more details.
134134

135135
{% tabs %}
136136
{% highlight c# tabtitle=".NET CLI" %}
137137

138-
dotnet add package Syncfusion.Blazor.Calendars -Version {{ site.releaseversion }}
138+
dotnet add package Syncfusion.Blazor.Grid -Version {{ site.releaseversion }}
139139
dotnet add package Syncfusion.Blazor.Themes -Version {{ site.releaseversion }}
140140
dotnet restore
141141

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

151151
### Add Import Namespaces
152152

153-
Open the **~/_Imports.razor** file and import the `Syncfusion.Blazor` and `Syncfusion.Blazor.Calendars` namespace.
153+
Open the **~/_Imports.razor** file and import the `Syncfusion.Blazor` and `Syncfusion.Blazor.Grids` namespace.
154154

155155
```cshtml
156156
157157
@using Syncfusion.Blazor
158-
@using Syncfusion.Blazor.Calendars
158+
@using Syncfusion.Blazor.Grids
159159
160160
```
161161

@@ -202,7 +202,7 @@ N> Check out the [Blazor Themes](https://blazor.syncfusion.com/documentation/app
202202

203203
### Add Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor component
204204

205-
Add the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Calendar component in the **~/Components/Pages/Home.razor** file. If an interactivity location as `per page/component`, define a render mode at the top of the `Home.razor` page.
205+
Add the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor DataGrid component in the **~/Components/Pages/Home.razor** file. If an interactivity location as `per page/component`, define a render mode at the top of the `Home.razor` page.
206206

207207
N> If an Interactivity Location is set to `Global` and the **Render Mode** is set to `Server`, the render mode is configured in the `App.razor` file by default.
208208

@@ -214,11 +214,35 @@ N> If an Interactivity Location is set to `Global` and the **Render Mode** is se
214214
{% tabs %}
215215
{% highlight razor %}
216216

217-
<SfCalendar TValue="DateTime" />
217+
@using Syncfusion.Blazor.Grids
218+
219+
<SfGrid DataSource="@Orders" />
220+
221+
@code{
222+
public List<Order> Orders { get; set; }
223+
224+
protected override void OnInitialized()
225+
{
226+
Orders = Enumerable.Range(1, 10).Select(x => new Order()
227+
{
228+
OrderID = 1000 + x,
229+
CustomerID = (new string[] { "ALFKI", "ANANTR", "ANTON", "BLONP", "BOLID" })[new Random().Next(5)],
230+
Freight = 2.1 * x,
231+
OrderDate = DateTime.Now.AddDays(-x),
232+
}).ToList();
233+
}
234+
235+
public class Order {
236+
public int? OrderID { get; set; }
237+
public string CustomerID { get; set; }
238+
public DateTime? OrderDate { get; set; }
239+
public double? Freight { get; set; }
240+
}
241+
}
218242

219243
{% endhighlight %}
220244
{% endtabs %}
221245

222-
* Press <kbd>Ctrl</kbd>+<kbd>F5</kbd> (Windows) or <kbd>⌘</kbd>+<kbd>F5</kbd> (macOS) to launch the application. This will render the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Calendar component in your default web browser.
246+
* Press <kbd>Ctrl</kbd>+<kbd>F5</kbd> (Windows) or <kbd>⌘</kbd>+<kbd>F5</kbd> (macOS) to launch the application. This will render the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor DataGrid component in your default web browser.
223247

224-
![Blazor Calendar Component](images/core-hosted/browser-output.png)
248+
{% previewsample "https://blazorplayground.syncfusion.com/embed/VXhoWjqXVirUZplo?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" backgroundimage "[Blazor DataGrid Component](images/blazor-datagrid-component.png)" %}

0 commit comments

Comments
 (0)