A newer version of this page is available. Switch to the current version.

GridControl Class

Displays data from a data source in various formats (Views): Tabular, Banded Tabular, Cards, Windows UI-inspired Tiles and MS Windows Explorer-inspired UI.

Namespace: DevExpress.XtraGrid

Assembly: DevExpress.XtraGrid.v18.2.dll

Declaration

[Docking(DockingBehavior.Ask)]
[ToolboxBitmap(typeof(ToolboxIconsRootNS), "GridControl")]
public class GridControl :
    EditorContainer,
    IScrollBarAnnotationsOwner<ScrollAnnotationKind>,
    IScrollBarOwner,
    IPrintableEx,
    IPrintable,
    IBasePrintable,
    IPrintHeaderFooter,
    IDirectXClient,
    INavigatableControl,
    IToolTipControlClient,
    ISupportLookAndFeel,
    IDXManagerPopupMenu,
    IViewController,
    IFilteredComponent,
    IFilteredComponentBase,
    IBoundControl,
    ISupportXtraSerializer,
    IGestureClient,
    IGuideDescription,
    ISearchControlColumnsClient,
    ISearchControlClient,
    ILogicalOwner
<Docking(DockingBehavior.Ask)>
<ToolboxBitmap(GetType(ToolboxIconsRootNS), "GridControl")>
Public Class GridControl
    Inherits EditorContainer
    Implements IScrollBarAnnotationsOwner(Of ScrollAnnotationKind),
               IScrollBarOwner,
               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 Data Grid is a container of Views, which display data from a bound list/table/collection in a specific format. If you bind the grid to a simple list/table/collection, a single View is required to present this data. To choose the data presentation format, set the GridControl.MainView property to any of the following objects:

  • GridView - Displays data in a tabular form.
  • BandedGridView - Displays data in a tabular form and allows grouping of columns into bands.
  • AdvBandedGridView - Displays data in a tabular form, allows grouping columns into bands and supports complex data cell arrangements.
  • CardView - Presents data records as cards, arranged down and then across. Card fields are always arranged in a single column.
  • LayoutView - 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.
  • TileView - 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.
  • WinExplorerView - Displays records using one of seven styles supported by MS Windows Explorer - Small, Medium, Large, Extra Large, List, Tiles and Content.

If you bind the grid to a table with master-detail relationships, the View you assign to the GridControl.MainView property presents data from the master table, while the detail Views, which you can specify with the GridControl.LevelTree collection, present data from the child tables.

The following are main properties the Data Grid provides:

See the following topics to learn more:

See Also