The WinForms Data Grid (GridControl) provides rich capabilities for displaying, shaping and editing data from any data source. You can choose between the following data presentation formats (Views) in the Data Grid.
Traditional tabular format (Grid View)
Banded tabular format (Banded Grid View and Advanced Banded Grid View).
Cards (Layout View and Card View)
Tiles (Tile View)
Windows Explorer-inspired style (WinExplorer View)
Data shaping capabilities include, but are not limited to, sorting, grouping, summary calculation, cell merging, data editing, master-detail and split presentations, as well as a rich set of filtering and data searching options such as built-in column filters and Find Panel.
You can bind to all traditional data sources. To work with large data sources, use dedicated synchronous and asynchronous server modes.
Introduces the Grid Control and its data presentation formats - Views. You will learn about the capabilities provided by Views, how to switch between Views, provide data, and customize the layout of columns, bands and card fields.
In addition to the GridControl component, the Data Grid Suite also includes two GridControl-based lookup editors and the control that supports the grid’s split presentation feature. Refer to the link to see a list of included components.
These are designated modes for working with large data sets. Even if your data source contains millions of records, the control’s performance will be still high due to 1) loading records in small portions on demand, and 2) performing data-related operations (such as sorting, filtering and summary calculation) on the server side.
This feature allows you to add columns to the grid to display custom data. Values for these columns can be calculated according to an expression or using an event.
The Data Grid control uses Views to present data from a bound data source. The Views specify how records and record fields are arranged. They provide multiple edit, display, behavior and appearance options. Choose one of the following View types to render data per your needs.
Layout View - Presents records as cards, which can be displayed in one or multiple columns, one or multiple rows, in an ellipse (carousel mode) or a single card at a time. Supports complex card field layouts, built-in groups, tabbed groups and labels.
Card View - Presents data records as cards, arranged down and then across. Card fields are always arranged in a single column.
WinExplorer View - Displays records using one of seven styles supported by MS Windows Explorer - Small, Medium, Large, Extra Large, List, Tiles and Content.
Tile View - Displays records as read-only tiles, using one of the following layout modes: default (one or multiple columns/rows), list (without spaces between records) and Kanban. This View provides the advanced field positioning feature, which helps you arrange fields relative to other fields, specify absolute or relative field display bounds, etc.
The most traditional tabular format, encapsulated by the Grid View, presents data source fields as columns and data source records as rows. The following are only a subset of the features supported by the grid layout.
Grid Views, Banded Grid Views and Advanced Banded Grid Views allow you to calculate multiple summary functions: the number of records, the maximum column value, a sum of column values, custom function, etc.
Total summaries (calculated against all rows)
Group summaries (calculated against grouped data).
Manual summary calculation
Selecting a summary function at runtime using a context menu
Multiple total summaries for a single column
Displaying group summaries in footers and group rows
In the Data Grid, you can specify the way column values are presented and edited by assigning DevExpress editors to columns. An end-user can edit records in-place and within a separate edit form. If a data source supports record adding and removing, you can perform record management in code and using a standalone or embedded Data Navigator control.
Adding and removing rows, in code and using a Data Navigator control
Editing data using 35+ in-place editors
Editing data in a standalone (modal) or in-line edit form
Multiple ways to filter and locate rows is supported. An end-user can search for data using a dedicated Find Panel (press CTRL+F) or using the incremental search feature.
Filter criteria created in code or at runtime allow you to narrow the displayed record set.
Built-in Find Panel
An end-user can filter data by using column filter dropdowns
Describes navigator controls that allow end-users to browse through the grid control’s data and add/delete records.
To format column values in a specific manner in display and edit modes, you can assign a certain DevExpress in-place editor to the column. Column in-place editors automatically format cell values according to the editor’s type and settings.
If default text formatting does not suit your needs, you can provide custom display text or format cell values using HTML and various format patterns.
Shows how to format cell display text using HTML tags, events, masks and the standard .NET formatting mechanism.
The Data Grid supports hierarchical data sources, which consist of master and detail tables (lists) linked by one-to-many relationships. Master tables can be presented by Grid Views, Banded Grid Views or Advanced Banded Grid Views, while detail tables can be presented by any of the available Views.
If records in the bound data source provide a property (or properties) of a collection type, the Data Grid automatically enables master-detail mode to render these collections.
For data sources that do not provide built-in capabilities to organize master-detail relationships on the data layer, you can realize master-detail mode using one of two approaches: implement the IRelationList interface for your data source or handle the grid control’s dedicated events.
The Grid Control’s data can be printed and exported to multiple formats. When exporting to MS Excel format, you can enable the data-aware export mode, which is optimized for subsequent analysis of grid data within Microsoft Excel.
You can change the Data Grid’s look-and-feel by applying one of the many skins. The Appearance mechanism allows you to change the colors and fonts of certain grid elements (grid columns, focused row, etc.). If you wish to highlight critical information, identify trends and compare data between cells, use the Conditional Formatting feature.
By default, the Data Grid loads all data from its data source before showing it on screen. If your grid records contain images, you can speed up the application performance and make the startup feel smoother by enabling the Asynchronous Image Load feature. In this mode, the grid loads its textual data first and immediately displays it. Images are loaded in a separate thread and displayed one by one using optional visual effects.
Batch modifications are designed to speed up the grid control’s performance by eliminating superfluous updates (visual, re-sorting, selection updates, etc.). The main objective is to update the View only once - after all the necessary changes have been made.
The term “layout” encompasses all the settings that control the visibility and size of visual elements, their appearance settings, filter, sorting, grouping and summary information, etc. The Grid Control provides methods to save the layout to a data store (an XML file, stream or the system registry) and then to restore it. This gives you the capability to save layouts between application runs.
There are times when you may need to recognize which element is located at the specified screen coordinates in applications. For instance, you may have to determine which part of a View the user has clicked or double-clicked. For this purpose, Views provide the CalcHitInfo method, which accepts a point measured in grid control client coordinates and returns a Hit Info object containing information on the View element at this point.
When an end-user hovers with the mouse over a visual element (e.g., column or band header) with truncated text, a hint showing complete text is displayed. This section explains how to modify default hints and add your own ones.
The Level Designer helps you to provide Views to display your data, and to easily access these View settings at design time. For hierarchical data sources, it allows you to assign a View for each data level.
The advanced Grid Designer enables you to customize Views, bands, columns, summaries, in-place editors, appearance settings, layout and other options.
The Feature Browser page gathers options and events provided by Views and columns into a set of categories (features). This is the best starting point to find the settings and events related to a specific functionality.