From RAD Studio API Documentation
Jump to: navigation, search


property FilterGroup: TFilterGroup read GetFilterGroup write SetFilterGroup;


__property TFilterGroup FilterGroup = {read=GetFilterGroup, write=SetFilterGroup, nodefault};


Type Visibility Source Unit Parent
property public
Data.Win.ADODB TCustomADODataSet


Filters a recordset based on row update status.

Use FilterGroup to filter the recordset displayed with an ADO dataset component. The filter requires the dataset be in update batch mode and the rows are filtered based on the update status of individual rows. Set FilterGroup to a TFilterGroup constant to filter the dataset to show just the rows that match that batch update status. For instance, set FilterGroup to fgPendingRecords to show just the rows that have been modified since the last update application.

if (ADODataSet1.LockType = ltBatchOptimistic) then begin
ADODataSet1.Filtered := True;
ADODataSet1.FilterGroup := fgPendingRecords;

if (ADODataSet1->LockType == ltBatchOptimistic)
ADODataSet1->Filtered = true;
ADODataSet1->FilterGroup = fgPendingRecords;

To use FilterGroup to filter based on the update status of rows, ensure that the LockType property is set to ltBatchOptimistic (a prerequisite for batch updating) and the Filtered property is set to true. In a filtered dataset, check the update status of individual rows using the RecordStatus property.

The TFilterGroup type consists of the following constants:

Filter group type Meaning


Specifies that no filtering is in effect. This constant is used internally by the ADO dataset component.


Removes any current filtering and all rows are visible. Can also be done by setting the Filtered property to false.


Filters to show just the rows that have been changed, whose changes have not been applied (UpdateBatch method) or canceled (CancelBatch).


Filters to show just the rows affected by the last update.


Filters to show just the rows in the current update cache. This is the result of the last call to retrieve rows from the database.


Filters to show just the deleted rows.


Filters to show just the rows that had changes made to them, changes that could not be applied due to errors on the apply attempt.

See Recordset.Filter property

See Also