Back to Devexpress

TdxCustomMemData.FilterList Property

vcl-dxmdaset-dot-tdxcustommemdata-1ec91726.md

latest1.6 KB
Original Source

TdxCustomMemData.FilterList Property

Provides access to the list of filtered records.

Declaration

delphi
property FilterList: TdxIntegerList read;

Property Value

TypeDescription
TdxIntegerList

The list of filtered records (as record indexes).

|

Remarks

The list accessible through the FilterList property maintains the list of filtered records when the ProgrammedFilter property is set to True.

Code Example: Populate Filtered Record Lists

The following code example populates the list of filtered records accessible through the FilterList property:

delphi
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;
cpp
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;

See Also

TdxCustomMemData Class

TdxCustomMemData Members

dxmdaset Unit