Skip to main content

TcxDBDataModeController Class

Represents a data mode controller, which manages data synchronization with a linked dataset.

Declaration

TcxDBDataModeController = class(
    TPersistent
)

Remarks

The TcxDBDataModeController class provides properties and events to synchronize data in a data controller (the TcxDBDataController class) with data of a linked dataset. Use the TcxDBDataController.DataModeController property to gain access to the corresponding data mode controller.

If the DataController property identifies a detail data controller and its DataSource property is linked to a parameterized query dataset (TQuery, for instance), you need to set the DetailInSQLMode property to True.

When you expand the detail level, which displays data from a parameterized query dataset, the query is reopened with new parameter values. This is performed automatically by the ReopenSQL method of the TcxDBProviderDetailFilterAdapter or TcxADOProviderDetailFilterAdapter class (you must add the cxADOAdapters unit to the uses section of your form if you want this to work for ADO queries). However, you can provide your own implementation via the OnDetailFirst event. In this event, you have to supply your query with any necessary parameter valuesand reopen it. When you navigate through records of such a detail controller or move from one detail controller to another, the data controller must know whether to reopen the underlying query or not. This is also performed automatically by the IsCurrentQuery method of the TcxDBProviderDetailFilterAdapter or TcxADOProviderDetailFilterAdapter class. But you can write an OnDetailIsCurrentQuery event handler to implement it in a custom manner. If the query should be reopened, the ReopenSQL method of the TcxDBProviderDetailFilterAdapter or TcxADOProviderDetailFilterAdapter class is called or the OnDetailFirst event is generated.

Inheritance

TObject
TPersistent
TcxDBDataModeController
See Also