vcl-dxmdaset-dot-tdxcustommemdata-5698e594.md
Specifies the active data filtering mode.
property ProgrammedFilter: Boolean read; write;
| Type | Description |
|---|---|
| Boolean | False Default. You can handle the OnFilterRecord event to implement a custom data filtering algorithm.TrueYou can use the FilterList property to populate the list of filtered dataset records based on custom criteria. The OnFilterRecord event does not occur in this mode. |
You can set the ProgrammedFilter property to True to populate the list of filtered records accessible through the FilterList property.
The following code example populates the list of filtered records accessible through the FilterList property:
var
AGroupIDField: TField;
begin
dxMemData1.ProgrammedFilter := True;
AGroupIDField := dxMemData1.FieldByName('GroupID');
while not dxMemData1.Eof do
begin
if AGroupIDField.AsInteger = 1 then
dxMemData1.FilterList.Add(dxMemData1.RecNo);
dxMemData1.Next;
end;
dxMemData1.Filtered := True;
end;
TField *AGroupIDField;
// ...
dxMemData1->ProgrammedFilter = true;
AGroupIDField = dxMemData1->FieldByName("GroupID");
do
{
if(AGroupIDField->AsInteger == 1)
dxMemData1->FilterList->Add(dxMemData1->RecNo);
dxMemData1->Next();
} while(!dxMemData1->Eof);
dxMemData1->Filtered = true;
The ProgrammedFilter property’s default value is False.
See Also