Syncfusion Feedback

Trusted by the world’s leading companies

Syncfusion Trusted Companies

Overview

The WinForms DataGrid control is used to display and manipulate tabular data efficiently. Its rich feature set includes data binding, editing, sorting, filtering, grouping, and exporting to Excel and PDF file formats. It has been optimized for working with millions of records as well as handling high-frequency, real-time updates.


High performance

Instant loading illustration for WinForms DataGrid

Instant loading

Load millions of records instantly.

Fast data processing of WinForms DataGrid illustration

Fast data processing

Data processing operations like sorting, filtering, grouping, summaries, and real-time updates are handled efficiently using PLINQ.

Printing illustration of WinForms DataGrid

Export

Quickly export the data grid content to Excel or PDF file formats.


Data binding

The WinForms DataGrid has data-binding support to work with popular data sources like SQL server, Oracle, data tables, and IEnumerable, as well as data providers like LINQ to SQL, ADO.NET, Entity Framework, and WCF Data Service.

Data binding illustration for WinForms DataGrid


Seamless editing experience

Use different built-in column types, such as combo box, date-time, and checkbox, to edit cell values. Commit or rollback changes when the data object implements IEditableObject. Also add new records dynamically.

Different column types in WinForms DataGrid

Widely used column types

The WinForms DataGrid control supports various column types. Users can display information and easily edit cell values using built-in, intuitive editors: a text box, numeric text box (includes currency and percentage text boxes), date picker, and checkbox.

WinForms DataGrid shows combo box column type

Look up data using the dropdown column type. The combo box editor is used to select an item from the dropdown.

WinForms DataGrid shows custom column type

Custom column types

The WinForms DataGrid allows you to create your own columns to perform customized operations for your business application use cases. It is also possible to change the behavior of built-in column types.


Data error indication and validation

Validate cells and display error information based on validation types such as IDataErrorInfo, INotifyDataErrorInfo, and data annotations. It is also possible to use cell, row, and custom validations.

Data validation in WinForms DataGrid view


Data operations

Multicolumn sorting in WinForms DataGrid view

Sorting

Sort data based on one or more columns with multiple customization operations. You can also sort by caption summary values when the grid is grouped or by writing custom logic.

WinForms DataGrid shows columns grouping

Grouping

Group data by one or more columns either through mouse and touch in the group drop area or in code behind. You can also group data with custom logic.

Excel-like filtering in WinForms DataGrid

Filter

Filter data using the built-in filter row or Excel-inspired filtering UI.

WinForms DataGrid shows summary rows

Summaries

Calculate and display sum, min, max, average, count, and custom aggregates in a table or group. Calculate summaries for selected records. Display summaries with different summary types:

  • Total or table summary
  • Group summary
  • Summary in group caption or header
  • Custom summary

Data manipulation

Real-time updates in WinForms DataGrid

Real-time updates

The WinForms DataGrid control can handle high-frequency updates even under the most demanding scenarios where the data is sorted and grouped in real-time. Summaries are also calculated and displayed in real-time scenarios.

Built-in add new row in WinForms DataGrid

Add new row

Add a new record in an underlying collection with a built-in row. It is also possible to place a newly added row at the top or bottom of a data grid.

WinForms DataGrid delete row

Delete row

Delete selected records in a data grid by pressing the Delete key. You can also change it to another key.

Text searching in WinForms DataGrid

Search and highlight text in a data grid and filter records based on the search text.


Selection in WinForms DataGrid

Selection

Select rows or cells for all keyboard navigations and mouse interactions like Excel.


Conditional formatting

Customize the appearance of cells, rows, or columns based on data.

Conditional formatting in WinForms DataGrid


Row and column customization

Auto fitted row height in WinForms DataGrid

Row height

Users can adjust (auto fit) the row height based on the content of any column or certain columns to enhance readability. It is also possible to set the row height conditionally.

WinForms DataGrid shows frozen rows and columns

Freeze panes

Users can freeze rows and columns at the top, bottom, left, and right positions, similar to Excel. Horizontal and vertical scrolling can be performed, except on fixed columns and rows.

WinForms DataGrid shows unbound column

Unbound columns

Display unbound columns with custom data. The control supports an expression to calculate values based on other columns.

WinForms DataGrid shows unbound rows

Unbound row

Display rows at the top and bottom of the grid with data that is not bound to a field or data source.

WinForms DataGrid shows merged cells with images

Cell merging

Dynamically merge data in adjacent cells and present that data in a single cell. Merge data based on content by writing your own custom logic.

WinForms DataGrid shows stacked headers

Stacked headers

Stacked headers (column header span) allow users to show unbound header rows. They span the stacked header columns across multiple rows and columns.


Master details view of WinForms DataGrid

Master-details view (hierarchical)

A master-details view (nested data grid view) can be represented using nested grids that can be expanded and collapsed. Functions like editing, sorting, filtering, and grouping are supported. Unlimited levels of nested grid relationships are allowed.


Preview row

Display additional information of a row. View the preview row by expanding and collapsing the record as required. A custom view can also be shown by using custom drawing logic.

Preview row support in WinForms DataGrid


Paging support in WinForms DataGrid

Paging

Use the data pager control to view records in multiple pages. The data pager also supports the on-demand loading of data.


Appearance style

The appearance of a DataGrid and its inner elements, such as rows, cells, columns, headers, and summary rows, can be customized easily.

Styling in WinForms DataGrid


Drag and drop in WinForms DataGrid

Drag and drop

Reorder the rows and columns by simply dragging them with a long press and dropping them into place.


Column chooser

Users can change the visibility of columns at runtime using the customizable column chooser UI.

Column chooser is showing in WinForms DataGrid


WinForms DataGrid shows context menu

Context menu

The WinForms DataGrid control provides an entirely customized context menu to expose functionality on the user interface. Users can create context menus for different rows, such as a record row, summary row, or group caption header, in an efficient manner.


Exporting

Export a data grid to Excel, CSV, and PDF file formats with a rich set of options.

Exporting to Excel and PDF of WinForms DataGrid illustration


Localization

Localization of WinForms DataGrid

Localization

Localize all the static, default strings in the WinForms DataGrid to any desired language.

Right to left mode of WinForms DataGrid

Right to left (RTL)

Display text from right to left (RTL) for users working with languages like Hebrew, Arabic, or Persian.


Column sizing

Adjust (auto fit) the column width based on the content of any column or column header. Fit all the columns within the viewport of a data grid.


Data virtualization

Create records on demand by automatically enabling data virtualization. Load millions of records of data instantly with virtualization enabled.


Clipboard operations

Perform clipboard operations such as cut, copy, and paste within the control and between it and other applications such as Notepad or Excel.


Serialization

Serialize the WinForms DataGrid settings to XML format and load them back (deserialization) to the data grid using built-in serialization options.


UI automation

The WinForms DataGrid control is compatible with Coded UI and UFT (formerly QTP) automation tools to automate applications.

UI automation illustration for WinForms DataGrid


WinForms DataGrid code example

Easily get started with the WinForms DataGrid using a few simple lines of C# code, as demonstrated below. Also explore our WinForms DataGrid example, which shows you how to render and configure the WinForms DataGrid.

using System.ComponentModel;
using System.Windows.Forms;
using System.Collections.ObjectModel;
using Syncfusion.WinForms.DataGrid;
namespace WindowsFormsApplication1
{
    /// <summary>
    /// Summary description for Form1.
    /// </summary>
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            SfDataGrid sfDataGrid = new SfDataGrid();
            this.Controls.Add(sfDataGrid);
            sfDataGrid.DataSource = new OrderInfoCollection().Orders;
            sfDataGrid.Location = new System.Drawing.Point(12, 12);
            sfDataGrid.Size = new System.Drawing.Size(240, 150);
        }
    }
}
using System.ComponentModel;
using System.Windows.Forms;
using System.Collections.ObjectModel;
using Syncfusion.WinForms.DataGrid;
namespace WindowsFormsApplication1
{
    public class OrderInfo : INotifyPropertyChanged
    {
        decimal? orderID;
        string customerId;
        string country;
        string customerName;
        string shippingCity;
        public decimal? OrderID
        {
            get { return orderID; }
            set { orderID = value; this.OnPropertyChanged("OrderID"); }
        }
        public string CustomerID
        {
            get { return customerId; }
            set { customerId = value; this.OnPropertyChanged("CustomerID"); }
        }
        public string CustomerName
        {
            get { return customerName; }
            set { customerName = value; this.OnPropertyChanged("CustomerName"); }
        }
        public string Country
        {
            get { return country; }
            set { country = value; this.OnPropertyChanged("Country"); }
        }
        public string ShipCity
        {
            get { return shippingCity; }
            set { shippingCity = value; this.OnPropertyChanged("ShipCity"); }
        }
        public event PropertyChangedEventHandler PropertyChanged;
        private void OnPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }
    }
using System.ComponentModel;
using System.Windows.Forms;
using System.Collections.ObjectModel;
using Syncfusion.WinForms.DataGrid;
namespace WindowsFormsApplication1
{
    public class OrderInfoCollection
    {
        private ObservableCollection<OrderInfo> orders;
        public ObservableCollection<OrderInfo> Orders
        {
            get { return orders; }
            set { orders = value; }
        }
        public OrderInfoCollection()
        {
            orders = new ObservableCollection<OrderInfo>();
            orders.Add(new OrderInfo() { OrderID = 1001, CustomerName = "Thomas Hardy", Country = "Germany", CustomerID = "ALFKI", ShipCity = "Berlin" });
            orders.Add(new OrderInfo() { OrderID = 1002, CustomerName = "Laurence Lebihan", Country = "Mexico", CustomerID = "ANATR", ShipCity = "Mexico" });
            orders.Add(new OrderInfo() { OrderID = 1003, CustomerName = "Antonio Moreno", Country = "Mexico", CustomerID = "ANTON", ShipCity = "Mexico" });
           orders.Add(new OrderInfo() { OrderID = 1004, CustomerName = "Thomas Hardy", Country = "UK", CustomerID = "AROUT", ShipCity = "London" });
            orders.Add(new OrderInfo() { OrderID = 1005, CustomerName = "Christina Berglund", Country = "Sweden", CustomerID = "BERGS", ShipCity = "Lula" });
        }
    }
}



125+ WINDOWS FORMS CONTROLS

Frequently Asked Questions

The Syncfusion WinForms DataGrid provides the following features:

  • Instantly load large amounts of data.
  • Handle high-frequency updates even for demanding scenarios.
  • Use features such as editing, grouping, sorting, filtering, summaries, and more out of the box.

  • Do infinite or endless scrolling to load more rows continuously.
  • Interact with a rich UI using keyboard navigation.

  • Build complex, large-scale applications with loads of customizable features.
  • Enjoy a simple configuration and API.
  • Create a touch-friendly and responsive UI.
  • Take advantage of extensive demos and documentation to get started quickly with WinForms DataGrid.

You can find our WinForms DataGrid demo on GitHub.

No, this is a commercial product and requires a paid license. However, a free community license is also available for companies and individuals whose organizations have less than $1 million USD in annual gross revenue, 5 or fewer developers, and 10 or fewer total employees.

A good place to start would be our comprehensive getting started documentation.

Our Customers Love Us

Having an excellent set of tools and a great support team, Syncfusion® reduces customers’ development time.
Here are some of their experiences.

See Real Success Stories

Developers around the world trust Syncfusion’s Essential Studio to simplify complex projects and speed up delivery. With a vast library of UI controls, powerful SDKs, and reliable support, Essential Studio helps teams build enterprise-ready applications with confidence.

Explore Case Studies


Rated by users across the globe

Transform your applications today by downloading our free evaluation version
Download Free Trial No credit card required.

Syncfusion Windows Forms Resources

Awards

Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion® is proud to hold the following industry awards.

Up arrow icon