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

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Fredkoe
Posts: 2
Joined: Wed 21 Mar 2007 20:05

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

Post by Fredkoe » Sat 31 Mar 2007 19:14

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)?

Jackson
Posts: 512
Joined: Thu 26 Jan 2006 10:06

Post by Jackson » Mon 02 Apr 2007 10:44

You can use the following construction to set filter expression for a field:

Code: Select all

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

Post Reply