GridControl Class
Displays data from a data source in a standard tabular form (view), or in various other forms (as a banded grid, cards or tiles). Supports numerous editing and data-shaping features, such as summaries, filtration, data grouping, master-detail mode, etc. See Data Grid.
Namespace: DevExpress.XtraGrid
Assembly: DevExpress.XtraGrid.v17.2.dll
Declaration
[Docking(DockingBehavior.Ask)]
[ComplexBindingProperties("DataSource", "DataMember")]
[ToolboxTabName("DX.17.2: Data & Analytics")]
[DataAccessMetadata("All", SupportedProcessingModes = "All")]
[ToolboxBitmap(typeof(ToolboxIconsRootNS), "GridControl")]
public class GridControl :
EditorContainer,
IPrintableEx,
IPrintable,
IBasePrintable,
IPrintHeaderFooter,
IDirectXClient,
INavigatableControl,
IToolTipControlClient,
ISupportLookAndFeel,
IDXManagerPopupMenu,
IViewController,
IFilteredComponent,
IFilteredComponentBase,
IBoundControl,
ISupportXtraSerializer,
IGestureClient,
IGuideDescription,
ISearchControlColumnsClient,
ISearchControlClient,
ILogicalOwner
Related API Members
The following members accept/return GridControl objects:
Library | Related API Members |
---|---|
WinForms Controls | BaseView.GridControl |
GridSplitContainer.Grid | |
GridSplitContainer.SplitChildGrid | |
Dashboard | DashboardItemControlEventArgs.GridControl |
eXpressApp Framework | WinColumnsListEditor.Grid |
Remarks
The grid control displays data by means of views. If the grid doesn’t represent master-detail relationships, it displays a single View specified by the GridControl.MainView property. If the main View’s data source has child relations or you supply detail data manually, the grid control can display Views representing detail data. Thus, the grid control implements View management mechanisms to arrange them, provide data, specify common appearance, etc. It also manages the collection of pattern Views that may be used to represent details, the collection of all detail Views currently opened, and the collection of all registered Views that can be used to display data. These collections are exposed by the GridControl.LevelTree, GridControl.Views and GridControl.AvailableViews properties.
To bind the grid control to data, you should use its GridControl.DataSource and GridControl.DataMember properties. Please refer to the Data Binding and Master-Detail Relationships topics for additional information.
The grid control is also capable of displaying a data navigator that can be used to navigate and edit data in all displayed Views. The navigator’s visibility and content can be changed using the GridControl.UseEmbeddedNavigator and GridControl.EmbeddedNavigator properties.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the GridControl class.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.