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 foEqual Filter Operator

To create a simple filter condition with the foEqual operator, you can use the AddItem method of the data controller’s Filter object. In the following example, a filter condition is applied to the cxGrid1DBTableView1ID column of the cxGrid1DBTableView1 view. This selects records with the ID field equal to 101:

var
  ID: Integer;
  Str: string;
//...
  ID := 101;
  Str := IntToStr(ID);
  cxGrid1DBTableView1.DataController.Filter.AddItem(nil, 
    cxGrid1DBTableView1ID, foEqual, ID, Str);