TcxCustomDataController.ClearDetails Method
Recreates existing clones of detail data controllers associated with the current master data controller.
Declaration
procedure ClearDetails; virtual;
Remarks
The ClearDetails method is applied to non-pattern master data controllers, i.e. to master data controllers whose IsPattern property returns False. See this property description for more information.
The ClearDetails method recreates existing clones of detail data controllers associated with the current non-pattern master data controller. Clones are recreated using the current settings of this detail data controller.
For instance, you can change the settings of the pattern detail data controller and then call ClearDetails to apply these changes to all existing detail clones.
For information on patterns and clones, see the TcxCustomDataController description.
The following example adds a new filter condition (PurchaseDate > 01/01/2003) to the pattern data controller of the detail tvOrders View in ExpressQuantumGrid. The ClearDetails method is called for the master data controller (the data controller for the master tvCustomers View) in order to apply this condition to all existing clones of the detail data controller.
var
ADate: string;
//...
ADate := '01/01/2003';
with tvOrders.DataController do
begin
BeginUpdate;
try
Filter.Clear;
Filter.Root.AddItem(tvOrdersPurchaseDate, foGreater, StrToDate(ADate), ADate);
Filter.Active := True;
finally
EndUpdate;
end;
end;
tvCustomers.DataController.ClearDetails;