Skip to content

SyncfusionExamples/how-to-create-the-simple-sample-in-winui-datagrid

Repository files navigation

How to create WinUI DataGrid?

About the sample

This example illustrates 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 SfDataGrid with code examples.

Requirements to run the demo

Visual Studio 2019 and above versions

About

How to create the simple sample in WinUI DataGrid (SfDataGrid)?

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages