vcl-cxgridcustomview.md
The base class for all grid Views.
TcxCustomGridView = class(
TcxControlChildComponent,
IcxStoredObject,
IcxStoredParent,
IcxGridViewLayoutEditorSupport,
IdxAdornerTargetElement,
IdxAutomationElement
)
The TcxGrid control relies on Views (TcxCustomGridView descendants) to connect to data as well as manage and display it in various formats. Each available grid View type implements a specific data display layout (a table, card, chart diagram, custom layout, etc.) and corresponding end-user interaction options.
Table View: Unbound | Bound | Server ModeA simple table, similar to a data grid (a TCustomGrid descendant) found in the standard VCL library.Banded Table View: Unbound | Bound | Server ModeA table data layout that allows you to group columns into higher-level headers (bands).Card View: Unbound | BoundDisplays each record in a block similar to a contact card.Layout View: Unbound | BoundDisplays each record as a card with a customizable layout.Chart View: Unbound | BoundDisplays data as bar, column, line, area, or pie diagrams. One grid Chart View can display only one diagram at a time.WinExplorer View: Unbound | BoundSupports the same data display modes as those found in Microsoft Windows Explorer: Small, Medium, Large, Extra-Large, List, and Content.
The list below outlines key members of the TcxCustomGridView class. These members allow you to manage grid View states and configure base settings.
ImagesAllows you to assign an image source for data item headers.OptionsViewProvides access to grid View element appearance settings.ShowHourglassCursor | HideHourglassCursorAllow you to display or hide the hourglass cursor (for time-consuming operations).StylesProvides access to a style collection that allows you to override appearance settings for individual grid View elements.
DragModeSpecifies the operation that starts a drag-and-drop operation in the grid View.OptionsSelectionProvides access to selection-related behavior options.PopupMenuAllows you to associate the grid View with a pop-up menu component.TabStopSpecifies if users can navigate to the grid View using the Tab keystroke.
OnGetStoredProperties | OnGetStoredPropertyValue | OnInitStoredObject | OnSetStoredPropertyValueAllow you to customize grid View state store/restore operations.StoreDataViewState | RestoreDataViewStateStore/restore only user interaction states (selection, focus, the scroll position, etc.) in memory during the same session.StoreDataViewStateToStream | RestoreDataViewStateFromStreamStore/restore only user interaction states (selection, focus, scroll position, etc.) in a separate stream. These methods complement StoreToStream and RestoreFromStream.StoreToIniFile | RestoreFromIniFileStore/restore the grid View state (both data layout and user interaction states) in an INI file.StoreToRegistry | RestoreFromRegistryStore/restore the grid View state (both data layout and user interaction states) in the system registry.StoreToStream | RestoreFromStreamStore/restore the grid View state (both data layout and user interaction states) in a stream.
OnDblClick | OnMouseDown | OnMouseEnter | OnMouseLeave | OnMouseMove | OnMouseUp | OnMouseWheel | OnMouseWheelDown | OnMouseWheelUpAllow you to execute custom code in response to mouse actions in the grid View.OnDragDrop | OnStartDrag | OnDragOver | OnEndDragAllow you to respond to drag & drop operations or prevent them.OnKeyDown | OnKeyPress | OnKeyUpAllow you to respond to keystrokes while the grid View has focus.
ClonesProvides indexed access to all existing clones of the current grid View.CloneCountReturns the total number of clone grid Views accessible through the Clones property.IsDetail | IsMaster | IsPattern | HasAsClone | HasAsMasterAllow you to identify the grid View role in a full data structure.LevelProvides access to the parent grid View level.PatternGridViewProvides access to the pattern grid View (if the current grid View is a clone).SiteProvides access to the parent container (a grid site) of the current grid View.Synchronization
Specifies if all clones of the current detail grid View are synchronized automatically with their pattern grid View.
Note
This setting is in effect only for detail grid Views in a master-detail relationship.
AssignSettings | Assign | AssignToCopy compatible settings between grid Views (terminal TcxCustomGridView descendant instances).BeginUpdate | EndUpdate | CancelUpdateAllow you to avoid excessive redraw operations during batch data and appearance changes.ControllerAllows you to imitate user actions in code (scroll content, navigate between data items, start/cancel search operations, etc.).DataController
Provides access to the underlying data controller designed for all data shaping and management operations.
Note
Different TcxCustomGridView class descendants use different data controller types depending on their data access mode (Unbound, Bound/Data-Aware, or Server).
FocusedSpecifies if the grid View has focus.Invalidate | LayoutChanged | ViewChangedRedraw grid View content.RestoreDefaultsRestores default settings for the grid View.VisibleSpecifies if the grid View is visible.
All public APIs in this section reference a grid View as a TcxCustomGridView object. To access all public API members of an individual grid View, cast a returned object to the corresponding terminal TcxCustomGridView descendant.
TcxCustomGrid.ActiveViewProvides access to the View associated with the currently active root grid level.TcxCustomGrid.CreateViewCreates a View of a specified class and adds it to the View list.TcxCustomGrid.ViewsSpecifies the list of all Views contained within a grid control.TcxGridLevel.GridViewSpecifies the View associated with the current level.TcxCustomGridViewClass
Do not use the TcxCustomGridView class directly. Use the following descendants instead:
TcxGridBandedTableViewA View that groups columns into bands.TcxGridCardViewA Card grid View.TcxGridChartViewA grid Chart View.TcxGridLayoutViewAn unbound Layout grid View.TcxGridTableViewAn unbound Table View in the VCL Data Grid.TcxGridWinExplorerViewAn unbound WinExplorer View.
TcxGridDBBandedTableViewA data-aware Banded Table View.TcxGridDBCardViewRepresents a data-aware Card View.TcxGridDBChartViewA data-aware grid chart View.TcxGridDBLayoutViewA data-aware Layout View.TcxGridDBTableViewA bound Table View in the VCL Data Grid.TcxGridDBWinExplorerViewA data-aware WinExplorer View.
TcxGridServerModeBandedTableViewThe Banded Table View that provides support for server mode.TcxGridServerModeTableViewThe Table View that provides support for server mode.
IcxGridViewLayoutEditorSupport
TObject TPersistent TComponent TcxCustomComponent TcxComponent TcxControlChildComponent TcxCustomGridView
See Also