TcxDataControllerOption Enum
Enumerates data controller behavior flags.
Declaration
TcxDataControllerOption = (
dcoAnsiSort,
dcoCaseInsensitive,
dcoAssignGroupingValues,
dcoAssignMasterDetailKeys,
dcoSaveExpanding,
dcoSortByDisplayText,
dcoFocusTopRowAfterSorting,
dcoGroupsAlwaysExpanded,
dcoImmediatePost,
dcoInsertOnNewItemRowFocusing,
dcoMultiSelectionSyncGroupWithChildren
);
Members
Name | Description |
---|---|
dcoAnsiSort
|
Forces the built-in sort algorithm to use active locale settings to sort records by string values. If this flag is not set, all string comparison operations rely on ordinal values of characters in a string. |
dcoCaseInsensitive
|
Disables case sensitivity for sort operations. |
dcoAssignGroupingValues
|
Default. A record insert operation automatically assigns grouping values from the focused record if grouping is in effect. If this flag is not set, a record insert operation does not assign grouping values. |
dcoAssignMasterDetailKeys
|
Default. A record insert operation in a detail dataset automatically assigns record fields specified through the DetailKeyFieldNames property. The DetailKeyFieldNames property specifies key fields in a detail dataset that allows the data controller to establish a master-detail relationship with a master dataset. Note This flag affects only detail datasets in an established master-detail relationship with a master dataset. |
dcoSaveExpanding
|
The data controller maintains current expansion and selection states of all row groups after a record reload operation from the underlying dataset. If this flag is not set, a record reload operation resets expansion and selection states for all row groups. |
dcoSortByDisplayText
|
The data controller sorts records by cell display text rather than field values. This option is useful if you assign the TcxExtLookupComboBox or TcxComboBox as an in-place editor for a grid data item. If this flag is not set, the data controller sorts records by field values. |
dcoFocusTopRowAfterSorting
|
The data controller moves focus to the top record after a sort operation. If this flag is not set, sort operations do not affect focus. For example, you can change focus behavior in an OnSortingChanged event handler. |
dcoGroupsAlwaysExpanded
|
This flag keeps all record groups expanded. |
dcoImmediatePost
|
The data controller immediately posts a field value change to the underlying dataset. |
dcoInsertOnNewItemRowFocusing
|
The data controller adds a new record to the underlying dataset when a newly created data row receives focus. |
dcoMultiSelectionSyncGroupWithChildren
|
The data controller synchronizes the selected state of group rows and their grouped rows. Note This flag affects the row selection behavior only if the MultiSelect property is set to |
Remarks
The TcxDataControllerOption
type enumerates flags that correspond to individual data controller behavior settings. The TcxCustomDataController.Options property can include any number of TcxDataControllerOption
flags in any combination.
Code Example: Focus the Top Record after Sorting
The following code example moves focus to the first record after a sort operation:
var
ADataController: TcxGridDataController;
begin
ADataController := cxGrid1TableView1.DataController;
ADataController.Options := ADataController.Options + [dcoFocusTopRowAfterSorting];
end;
Alternatively, you can move focus to the first record in an OnSortingChanged event handler.
Direct TcxDataControllerOption Type Reference
The TcxDataControllerOptions type references the TcxDataControllerOption
type.