Skip to content

Commit 27ef60b

Browse files
authored
How to create the simple sample in WinUI DataGrid (SfDataGrid)?
How to create the simple sample in WinUI DataGrid (SfDataGrid)?
1 parent 53fdf59 commit 27ef60b

File tree

1 file changed

+43
-2
lines changed

1 file changed

+43
-2
lines changed

README.md

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,43 @@
1-
# how-to-create-the-simple-sample-in-winui-datagrid
2-
How to create the simple sample in WinUI DataGrid (SfDataGrid)?
1+
# How to create the simple sample in WinUI DataGrid (SfDataGrid)?
2+
3+
## About the sample
4+
This example illustrates how to create the simple sample in [WinUI DataGrid](https://www.syncfusion.com/winui-controls/datagrid) (SfDataGrid)?
5+
6+
[WinUI DataGrid](https://www.syncfusion.com/winui-controls/datagrid) (SfDataGrid) is used to display and manipulate tabular data. Its rich feature set includes functionalities like data binding, editing, sorting, filtering, and grouping. It has also been optimized to work with millions of records, as well as to handle high-frequency, real-time updates.
7+
8+
## Creating an application with WinUI DataGrid
9+
1. Create a [WinUI 3 desktop app for C#](https://docs.microsoft.com/en-us/windows/apps/winui/winui3/get-started-winui3-for-desktop) and .NET 5 or [WinUI 3 app in UWP for C#](https://docs.microsoft.com/en-us/windows/apps/winui/winui3/get-started-winui3-for-uwp).
10+
2. Add reference to [Syncfusion.Grid.WinUI](https://www.nuget.org/packages/Syncfusion.Grid.WinUI) NuGet.
11+
3. Import the control namespace Syncfusion.UI.Xaml.DataGrid in XAML or C# code.
12+
4. Initialize the SfDataGrid control.
13+
14+
```XML
15+
16+
<Page
17+
x:Class="SfDataGridDemo.MainPage"
18+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
19+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
20+
xmlns:local="using:SfDataGridDemo"
21+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
22+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
23+
xmlns:syncfuion="using:Syncfusion.UI.Xaml.DataGrid"
24+
mc:Ignorable="d"
25+
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
26+
27+
<Page.DataContext>
28+
<local:ViewModel />
29+
</Page.DataContext>
30+
31+
<Grid>
32+
<syncfuion:SfDataGrid ItemsSource="{Binding Orders}" />
33+
</Grid>
34+
</Page>
35+
36+
```
37+
38+
![Shows the creating simple SfDataGrid Application](CreatingSimpleSfDataGrid.gif)
39+
40+
Take a moment to peruse the [WinUI DataGrid – Getting Started](https://help.syncfusion.com/winui/datagrid/getting-started) documentation, where you can find about [WinUI DataGrid](https://www.syncfusion.com/winui-controls/datagrid) (SfDataGrid) with code examples.
41+
42+
## Requirements to run the demo
43+
Visual Studio 2019 and above versions

0 commit comments

Comments
 (0)