Back to Devexpress

TcxDataControllerOptions Type

vcl-cxcustomdata-213bf127.md

latest1.6 KB
Original Source

TcxDataControllerOptions Type

A set of flags that correspond to data controller behavior options.

Declaration

delphi
TcxDataControllerOptions = set of TcxDataControllerOption;

Referenced Class

TypeDescription
TcxDataControllerOption

A flag that corresponds to an individual data controller behavior flag.

|

Remarks

Use TcxDataControllerOptions values to configure the behavior of a data controller.

Code Example: Focus the Top Row after Sorting

The following code example moves focus to the first record after a sort operation:

delphi
var
  ADataController: TcxGridDataController;
begin
  ADataController := cxGrid1TableView1.DataController;
  ADataController.Options := ADataController.Options + [dcoFocusTopRowAfterSorting];
end;
cpp
TcxGridDataController *ADataController = cxGrid1TableView1->DataController;
  ADataController->Options = TcxDataControllerOptions() << dcoAssignGroupingValues
         << dcoAssignMasterDetailKeys << dcoSaveExpanding << dcoFocusTopRowAfterSorting;

Alternatively, you can move focus to the first record in an OnSortingChanged event handler.

Direct TcxDataControllerOptions Type Reference

The TcxCustomDataController.Options property references the TcxDataControllerOptions type.

See Also

cxCustomData Unit