Back to Devexpress

TcxCustomGrid Class

vcl-cxgrid-80cc61be.md

latest7.0 KB
Original Source

TcxCustomGrid Class

The base class for the Data Grid control.

Declaration

delphi
TcxCustomGrid = class(
    TcxControl,
    IcxNavigator,
    IcxNavigatorRecordPosition,
    IdxSkinSupport,
    IcxLockedStatePaint,
    IcxLockedStateFontChanged
)

Remarks

The Data Grid allows you to display data as a table and in a variety of other formats. The control has multiple built-in features that allow users to shape and edit data.

Main API Members

The list below outlines key members of the TcxCustomGrid class. These members allow you to configure general Data Grid control settings and manage grid Views/levels.

Appearance Settings

ImagesSpecifies the image source for grid level tabs and column headers.LevelTabsProvides access to grid level tab appearance settings.LockedStateImageOptionsProvides access to Locked View image settings.LookAndFeelProvides access to look & feel settings at the Data Grid control level.OnPrepareLockedStateImageAllows you to custom draw a Locked View image.RootLevelOptions | RootLevelStylesAllow you to customize grid level appearance at the root hierarchy level.

Grid Level Management

ActiveLevelSpecifies the active root grid level.LevelsProvides access to the root grid level collection.

Grid View Management

ActiveViewProvides access to the grid View associated with the active root level.CreateViewCreates a new grid View of any supported type.ViewCountReturns the number of grid Views accessible through the Views property.ViewsProvides indexed access to all created grid Views.

User Interaction APIs

AutomationProvides access to UI Automation and accessibility-related settings.[1]FocusedViewAllows you to move focus between grid Views.OnActiveTabChanged | OnActiveTabChangedEx | OnFocusedViewChangedAllow you to respond to user navigation between grid Views.TabStopSpecifies if users can press Tab to focus the Data Grid control.

General-Purpose API Members

BeginUpdate | EndUpdate | CancelUpdateAllow you to avoid excessive redraw operations during batch data and appearance changes.Invalidate | LayoutChanged | SizeChangedRedraw the Data Grid control on demand.OnLayoutChangedAllows you to execute custom code in response to grid layout changes.

Terminal TcxCustomGrid Class Descendant

Do not use the TcxCustomGrid class directly. Use the TcxGrid control instead.

Get Started

The following tutorials help you get acquainted with the Data Grid control and its Views:

Table ViewThis tutorial describes how to add a Data Grid control to your application and set up a Table View display style.Banded Table ViewThis tutorial describes how to add a Data Grid control, specify data connections, and adjust appearance settings in a Banded Table View.

View Example: VCL Data Grid - Smart Semantic AI Filter

To see the TcxGrid control in action, run the Grid and Data Editors demo in the VCL Demo Center installed with compiled DevExpress VCL demos. Click different items in the sidebar on the left to switch between individual demos on corresponding features.

Download: Compiled VCL Demos

Tip

You can find full source code for the installed compiled VCL Data Grid demo in the following folder:

%PUBLIC%\Documents\DevExpress VCL Demos\MegaDemos\Product Demos\ExpressQuantumGrid

Implements

IcxNavigator

IcxNavigatorRecordPosition

IdxSkinSupport

IcxLockedStatePaint

IcxLockedStateFontChanged

Inheritance

TObject TPersistent TComponent TControl TWinControl TCustomControl TcxCustomControl TcxControl TcxCustomGrid

Footnotes

  1. Each grid Table View and column has its own Automation property (TcxGridTableView.Automation and TcxCustomGridColumn.Automation).

See Also

TcxCustomGridTableView Class

TcxCustomGrid Members

cxGrid Unit