Evaluate Essential Studio for Windows Forms free.Start building today.
Add Syncfusion Windows Forms controls to your app.
Use a package manager to add Syncfusion Windows Forms controls to your application now, or download Syncfusion Studio to browse samples and binaries on your desktop.
Install the WinForms DataGrid Package
Install via package manager
Install-Package Syncfusion.SfDataGrid.WinForms # To use Excel or PDF export functionality, install the Syncfusion.DataGridExport.WinForms package. Install-Package Syncfusion.DataGridExport.WinForms
Register your trial license key
Include your license key in Program.cs before initializing any Syncfusion components.
// Register the Syncfusion license
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR_LICENSE_KEY");
Create Data Model for sample application
SfDataGrid is a data-bound control. So before create binding to the control, you must create data model for 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 OrderInfoCollection class
Create an OrderInfoCollection class with Orders property and Orders property is initialized with several data objects in constructor.
public class OrderInfoCollection
{
public ObservableCollection<OrderInfo> Orders { get; set; }
public OrderInfoCollection()
{
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 component
Create the SfDataGrid control instance and add it to the Form. To bind the SfDataGrid to data, set the SfDataGrid.DataSource property to an IEnumerable implementation.
using Syncfusion.WinForms.DataGrid;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
SfDataGrid sfDataGrid1 = new SfDataGrid();
sfDataGrid1.Location = new System.Drawing.Point(85, 108);
sfDataGrid1.Size = new System.Drawing.Size(240, 150);
OrderInfoCollection orderInfoCollection = new OrderInfoCollection();
sfDataGrid1.DataSource = orderInfoCollection.Orders;
this.Controls.Add(sfDataGrid1);
}
}
}
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.