TcxGridTableView Class
An unbound Table View in the VCL Data Grid.
Declaration
TcxGridTableView = class(
TcxCustomGridTableView,
IdxLayoutContainerOwner
)
Remarks
This View allows you to display, manage, and shape data in a tabular format. Columns are key elements of the Table View.
Load Data
TcxGridTableView
supports the following data load modes:
- Unbound
- A grid View is not bound to a dataset and manages data preloaded into the data controller.
- Provider
- A grid View loads data from a custom data source on demand.
You can use the following Table Views to display data in bound or server mode:
Edit Data
The View allows users to input data in DevExpress editors that you can associate with individual columns. Alternatively, you can use in-place and modal Edit Forms with a customizable layout to edit data cell values.
Sort Data
The View allows users to sort data in ascending or descending order.
Users can sort data by the following values:
- Column cell values
- Group row values
- Group summary values
You can also sort data at design time and runtime.
Group Data
The View allows users to drag column headers to the Group By box to group data. You can combine any number of columns in data groups.
Filter
The View uses a data controller to filter data. When a user creates new filter conditions, the data controller retrieves only those data rows that meet these conditions. The View displays active filter criteria in the filter panel.
A user can create filter conditions in any of the following ways:
- Enter a condition in a column’s filter row.
- Click a column’s filter button to open the filter dropdown.
- Click the panel’s Customize button to open the Filter Builder dialog.
Search
The View has the Find Panel that allows users to type search requests and highlight results. You can switch the panel between search and data filter processing modes.
The panel also supports extended syntax that allows a user to input compound requests. You can use the compact panel and arrange it in the Group by box to free more space.
Conditional Formatting
You can create rules to apply custom formatting to the data rows whose content meets these rules.
Summaries
Summaries allow a user to calculate totals against all records or a group of records.
Navigation
The View can display the Data Navigator pane that allows users to navigate through data rows, manage records, and filter data.
Main API Members
You can use the TcxGridTableView
class members to manage the View’s layout, appearance, and behavior as follows:
Append a new column to the View’s column collection (CreateColumn).
Access the View’s column collection (Columns).
Obtain the total number of columns in the View (ColumnCount).
Respond to a column position or size change (OnColumnPosChanged and OnColumnSizeChanged).
Access grouped and visible columns (GroupedColumns and VisibleColumns).
Obtain the total number of visible, grouped, or fixed columns in the View (GroupedColumnCount, VisibleColumnCount, VisibleColumnCountByFixedKind).
Respond to a group row expand or collapse operation (OnGroupRowExpanded and OnGroupRowCollapsed).
Prevent an expand or collapse operation for a group row (OnGroupRowExpanding and OnGroupRowCollapsing).
Configure the View controller settings (Controller).
Track the View’s horizontal scroll position changes (OnLeftPosChanged).
Customize user interaction options (OptionsBehavior and OptionsCustomize).
Access the View’s data controller settings (DataController).
Specify how the View can manage data (OptionsData).
Configure the View’s filter settings (Filtering).
Configure data row and cell selection settings (OptionsSelection).
Customize the View’s appearance (OptionsView).
Specify appearance settings of the View elements (Styles).
Customize appearance and behavior settings of the View’s in-place edit form, Find Panel, Filter Box, Filter Row, View Navigator, and preview sections (EditForm, FindPanel, FilterBox, FilterRow, Navigator, and Preview).
Adjust new item row settings (NewItemRow).
Access the collection of data rows that fit into the View’s client area (ViewData).
Respond to a click on a column header (OnColumnHeaderClick).
Draw a column header or indicator cells in a custom manner (OnCustomDrawColumnHeader and OnCustomDrawIndicatorCell).
Specify how the View processes date and time values (DateTimeHandling).
Override or complement built-in draw routines for a group row, group footer, and group summary (OnCustomDrawGroupCell, OnCustomDrawFooterCell, and OnCustomDrawGroupSummaryCell).