Evaluate Essential Studio for WinUI free.Start building today.
Add Syncfusion WinUI controls to your app.
Use a package manager to add Syncfusion WinUI controls to your application now, or download Syncfusion Studio to browse samples and binaries on your desktop.
Install the WinUI DataGrid Package
Install via package manager
Install-Package Syncfusion.Grid.WinUI # To use Excel export functionality, install the Syncfusion.GridExport.WinUI package. Install-Package Syncfusion.GridExport.WinUI
Register your trial license key
Include your license key in App.xaml.cs before initializing any Syncfusion components.
// Register the Syncfusion license
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR_LICENSE_KEY");
Create data model for the sample application
SfDataGrid is a data-bound control. Before binding ItemsSource to the control, you must create a data model for the application.
public class OrderInfo
{
public int OrderID { get; set; }
public string CustomerID { get; set; }
public string CustomerName { get; set; }
public string Country { get; set; }
public string ShipCity { get; set; }
public OrderInfo(int orderId, string customerName, string country, string customerId, string shipCity)
{
OrderID = orderId;
CustomerName = customerName;
Country = country;
CustomerID = customerId;
ShipCity = shipCity;
}
}
Create a ViewModel class for the sample application
Create a ViewModel class with Orders property and Orders property is initialized with several data objects in constructor.
public class ViewModel
{
public ObservableCollection<OrderInfo> Orders { get; set; }
public ViewModel()
{
Orders = new ObservableCollection<OrderInfo>();
GenerateOrders();
}
private void GenerateOrders()
{
Orders.Add(new OrderInfo(1001, "Maria Anders", "Germany", "ALFKI", "Berlin"));
Orders.Add(new OrderInfo(1002, "Ana Trujilo", "Mexico", "ANATR", "Mexico D.F."));
}
}
Add DataGrid control
Import the control namespace Syncfusion.UI.Xaml.DataGrid in XAML or C# code and add the Syncfusion DataGrid control.
<Window x:Class="App1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App1"
xmlns:dataGrid="using:Syncfusion.UI.Xaml.DataGrid">
<Grid>
<Grid.DataContext>
<local:ViewModel/>
</Grid.DataContext>
<dataGrid:SfDataGrid x:Name="sfDataGrid"
AutoGenerateColumns="True"
ItemsSource="{Binding Orders}"/>
</Grid>
</Window>
Search a control. Copy its install command.
Search 245 controls across 14 platforms. Each command comes from that control’s getting-started guide, and every package is checked on NuGet, npm, or pub.dev.
Loading controls…
Evaluate faster with your coding agent.
Paste this prompt into GitHub Copilot, Claude Code, Cursor, or any agent. It sets up Syncfusion for your project from ai.syncfusion.com before it writes code.
Set up this project for Syncfusion before generating code. Fetch and follow the official instructions at https://ai.syncfusion.com then report the detected platform, installed skills, MCP status, and any required licensing action.
No key needed to install the skills. The MCP servers use the API key that comes with a free account. Agent setup guides
AI assistants
IDEs
Short, task-first walkthroughs.
Need help getting started?
Explore our resources or reach out to our support team for assistance.
Syncfusion Studio for your desktop.
One small download. Browse every product, download samples and binaries, and set up your IDE and AI assistant.