In this example, the foInList filter operator is applied to the cxGrid1DBTableView1ID column. The operator allows you to select records by testing the membership of a field value within a specific list (array of variants). The value list is created by the VarArrayCreate function.
var
V: Variant;
const
ID1 = 1; ID2 = 2; ID3 = 3;
//...
V := VarArrayCreate([0, 2], varVariant);
V[0] := ID1;
V[1] := ID2;
V[2] := ID3;
cxGrid1DBTableView1.DataController.Filter.AddItem(nil, cxGrid1DBTableView1ID, foInList, V, '(1, 2, 3)');
const ID1 = 1, ID2 = 2, ID3 = 3;
int Bounds[2] = {0, 2};
Variant V = VarArrayCreate(Bounds, 1, varVariant);
V.PutElement(ID1, 0);
V.PutElement(ID2, 1);
V.PutElement(ID3, 2);
cxGrid1DBTableView1->DataController->Filter->AddItem(NULL, cxGrid1DBTableView1ID, foInList, V, "(1, 2, 3)");