Articles in this section

How to create WinUI DataGrid?

WinUI 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. 

Creating an application with WinUI DataGrid

  1. Create a WinUI 3 desktop app for C# and .NET 5 or WinUI 3 app in UWP for C#.

  2. Add reference to NuGet.

  3. Import the control namespace Syncfusion.UI.Xaml.DataGrid in XAML or C# code.

  4. Initialize the SfDataGrid control.

<Page
    x:Class="SfDataGridDemo.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:SfDataGridDemo"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:syncfuion="using:Syncfusion.UI.Xaml.DataGrid"
    mc:Ignorable="d"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
 
    <Page.DataContext>
        <local:ViewModel />
    </Page.DataContext>
    
    <Grid>
        <syncfuion:SfDataGrid ItemsSource="{Binding Orders}" />
    </Grid>
</Page>
Shows the creating simple SfDataGrid Application


Take a moment to peruse the WinUI DataGrid – Getting Started documentation, where you can find about DataGrid with code n examples.


View sample in GitHub.

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied