CRDBGrid and SearchBar

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
mariusz
Posts: 62
Joined: Wed 16 Jul 2008 21:04
Location: Poland / Poznan
Contact:

CRDBGrid and SearchBar

Post by mariusz » Tue 03 Jul 2012 20:04

Hi... I have question...

Is there any way to set focus on search or filter bar on runtime? I tried to do it my-selves but without success.

regards
Mario

ZEuS
Devart Team
Posts: 240
Joined: Thu 05 Apr 2012 07:32

Re: CRDBGrid and SearchBar

Post by ZEuS » Wed 04 Jul 2012 07:24

CRDBGrid is a free component with open source code, that's why you can change the code yourself.
In the declaration of the TCRDBGrid class you should move the CRGridTitleEdit: TCRGridTitleEdit; line from the private to public section and reinstall the TCRDBGrid component. Now, you can use the TCRDBGrid.CRGridTitleEdit.ActivateAt method to set focus on the search or on the filter bar at runtime. For more details, take a look at the implementation of the TCRDBGrid.ActivateSearchEdit and TCRDBGrid.ActivateFilterEdit methods.

Post Reply