devexpress 的过滤器怎么用?
在运行时设置,
请给出一份源代码?

解决方案 »

  1.   

    例如:
      cxGrid1DBTableView1.DataController.Filter.BeginUpdate;
      try
        cxGrid1DBTableView1.DataController.Filter.Root.Clear;
        cxGrid1DBTableView1.DataController.Filter.Root.BoolOperatorKind := fboOr;
        cxGrid1DBTableView1.DataController.Filter.Root.AddItem(cxGrid1DBTableView1ID, foEqual, UserID, 'loginuserid');
      finally
        cxGrid1DBTableView1.DataController.Filter.EndUpdate;
      end;
      cxGrid1DBTableView1.DataController.Filter.Active := True;
    运算符还有:
    foEqual ;foNotEqual;foLess;foLessEqual;foGreater;foGreaterEqual
    ;foLike ;foNotLike;foBetween;foNotBetween;foInList;foNotInList;foYesterday;...