Skip to main content

Data Grid

  • 7 minutes to read

The WinForms Data Grid is a high-performance UI component powered by the DirectX rendering engine. The Data Grid (GridControl) ships with a flexible View-based architecture and includes numerous data shaping and UI customization features. The Data Grid can display and edit data from any data source of any size and complexity.

WinForms Data Grid | DevExpress

Watch Video: Getting Started Run Demo

Bind to Data

The Data Grid supports the following data sources and binding modes:

  • ADO.NET Data Sets
  • SQL Data
  • Entity Framework Data
  • XML Data
  • Excel Data Sources
  • LinQ To SQL
  • MongoDB
  • JSON
  • WCF Data Services
  • IList and IEnumerable
  • DevExpress ORM Tool (XPO)
  • Real-Time Data Display
  • Ultra-Fast Asynchronous and Synchronous Server Modes[1]
  • Unbound Columns[2]

With its integrated Data Source Configuration Wizard, you can bind the Data Grid without writing a single line of code.

Read the following topic for information on supported technologies and data sources: Data Binding.

Note

The Data Grid does not support unbound mode. The grid cannot function without a data source.

Data Presentation Views

The Data Grid control uses Views to display data from a data source. Views specify the presentation and layout of data records and fields. Views include a comprehensive set of edit, display, behavior, and appearance options.

Read the following topic for details: Get Started with Data Grid and Views.

DirectX Hardware Acceleration

With DirectX hardware acceleration, the Data Grid introduces a major increase in overall performance and HighDPI rendering quality (4K/8K).

Watch Video: DirectX vs GDI

HTML & CSS Markup Support

HTML & CSS Markup allows you to define data-aware templates quickly for Grid UI elements and create web-inspired user interfaces. This feature allows you to eliminate the use of property-based UI customizations and CustomDraw events.

HTML and CSS Markup Support - WinForms Data Grid | DevExpress

Watch Video Run Demo

Grid Customization

The Data Grid includes dozens of UI/UX customization options available to you and your users. Its advanced customization features include:

Watch Video

Group Data

You can group data against one or multiple columns in Grid Views, Banded Grid Views, and Advanced Banded Grid Views. Users can drag column headers and drop them onto the group panel to group data.

Data Grouping - WinForms Data Grid | DevExpress

Data grouping features include:

  • Group Data by Column Values or Display Text
  • Interval Grouping Inspired by MS Outlook
  • Inline Grouping
  • Merged Column Grouping
  • Master-Detail Grouping
  • Custom Grouping on Events
  • Fixed Group Rows
  • Sort Group Rows by Summary
  • Comprehensive API

Read the following topic to learn more: Data Grouping.

Watch Video Run Demo

Sort Data

The Data Grid ships with high-speed multi-column sorting. With its comprehensive sorting API, you can sort data in all Views and implement custom sorting algorithms. Users can sort data in Grid Views, Banded Grid Views, Advanced Banded Grid Views, Layout Views, and Card Views.

Read the following topic to learn more: Sorting.

Watch Video Run Demo

Data Summaries and Aggregates

Data Summaries and Aggregates - WinForms Data Grid | DevExpress

Grid Views, Banded Grid Views, and Advanced Banded Grid Views support the following data aggregation options:

  • Automatic Summaries (Average, Count, Min, Max, Sum)
  • Total Summaries (against all rows)
  • Group Summaries (against grouped data)
  • Custom Summaries
  • Summary Context Menu
  • Show multiple total summaries for a single column
  • Display Group Summaries in Footers and Group Rows
  • Format Summary Values
  • Sort Group Rows by Summary

Read the following topic to learn more: Summaries.

Watch Video Run Demo

Edit and Validate Data

The Data Grid allows you to incorporate over 35 individual data editors, sparklines, and charts within grid cells. Users can edit cell values in-place or in a separate edit form.

Edit and Validate Data - WinForms Data Grid | DevExpress

Advanced data editing features include:

  • New Item Row (add new records)
  • Edit Data Inline
  • Inline and Modal Edit Forms
  • Create Custom Edit Forms
  • Edit Masks and HTML Formatting
  • Input Validation and Error Indication
  • Embedded Data Navigator
  • Comprehensive Data Editing API

Read the following topic to learn more: Data Editing and Validation.

Watch Video Run Demo

Data Filtering and Search - WinForms Data Grid | DevExpress

The Data Grid includes a comprehensive set of filter and custom query options.

  • Integrated Find Panel (CTRL+F)
  • Incremental Search
  • Auto-Filter Row
  • Excel-Inspired Filter Dropdowns
  • Filter History (Most Recently Used Filters)
  • Filter Criteria Editor
  • Group Filters

Read the following topic to learn more: Filter and Search.

Watch Video Run Demo

Focus and Selection

Users can navigate between grid cells (move cell focus) with a mouse and keyboard. The Data Grid also supports multiple cell and row/card selection. Grid Views and Banded Grid Views can display a column with checkboxes that allows users to select rows.

Focus and Selection - WinForms Data Grid | DevExpress

Read the following topics for more information on row/cell selection:

Run Demo

Format Cell Values

Column editors automatically format cell values according to the editor’s type and settings. Built-in text formatting options include:

Read the following topic for detailed information on how to format cells with HTML tags, events, and masks: Format Cell Values.

Excel-Inspired Conditional Formatting

Conditional Formatting allows you and your users to highlight cells and rows with animated data bars, icons, and predefined color scales based on specified criteria.

Excel-Inspired Conditional Formatting - WinForms Data Grid | DevExpress

You can use predefined format rules or create custom rules. The Data Grid ships with both a design-time and runtime Conditional Formatting Rule Editor.

Read the following topic to learn more: Conditional Formatting.

Watch Video Run Demo

Master-Detail

The Data Grid allows you to create Master-Detail layouts with any number of nesting levels and any number of details at each level. You can display master tables in Grid Views, Banded Grid Views, or Advanced Banded Grid Views, and show detail tables in any View type.

Master-Detail - WinForms Data Grid | DevExpress

The Data Grid automatically enables master-detail mode if data source records contain a property (or properties) of a collection type. See the following topic for detailed information and examples: Master-Detail Relationships.

Note

Use one of the following techniques to implement master-detail functionality for data sources that cannot organize master-detail relationships at the data layer:

  • Implement the IRelationList interface for your data source.
  • Handle the grid control’s master-detail events.

Run Demo

You can print and export Data Grid content to multiple file formats (PDF, XLS, XLSX, MHT, CSV, HTML, RTF, DOCX, TXT, IMAGE). Read the following topics for detailed information and examples:

Appearance Customization

The Data Grid supports multiple appearance options/techniques.

Drag-and-Drop Rows

Users can drag and drop data items (rows, tiles, etc.) inside or outside the Data Grid. Read the following topic for details and examples: Drag-and-Drop Grid Rows.

Run Demo

Design-Time Customization

The Data Grid ships with a powerful Visual Studio IDE designer and intuitive customization interface designed to simplify setup. Design-time UI/UX customization options include:

Miscellaneous Features

Troubleshooting

Common Issues and Troubleshooting - WinForms Grid Control

Footnotes
  1. Use Server modes for extremely large data sets. Even if your data source contains millions of records, the grid maintains its performance because it loads records in small portions on demand and performs data-related operations (data sorting, filtering, and summary calculation) on the server side. Server modes replace traditional data pagination. Read the following topic for details: Large Data Sources: Server and Instant Feedback Modes.

  2. Unbound columns allow you to display custom data. Values for these columns can be calculated according to an expression or within an event handler. See the following topic for details and examples: Unbound Columns.

See Also