Page 1 of 1

Change a filter expression field in the filter bar of a CRDBGrid by program

Posted: Sat 31 Mar 2007 19:14
by Fredkoe
I'm using the CRDBGrid in a DELPHI 7-program and it works fine, when I fill a filter expression field in the filter bar by keyboard input.
My problem is now: How can I fill a filter expression field by program (e.g. from a procedure)?

Posted: Mon 02 Apr 2007 10:44
by Jackson
You can use the following construction to set filter expression for a field:

Code: Select all

  CRDBGrid1.Columns[0].FilterExpression := '> 20';
  CRDBGrid1.ApplyFilter;