Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Example: Using the foInList Filter Operator

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)');