CodedK
asked on
Search - find in Dbgrid
Hi.
I want to add a code in my database application, that can search for a string like a telephone number and then the number in the dbgrid receive focus.
More specific :
I would like something like a quick search where i put a letter or 2 in an editbox and then the dbgrid scroll down to that number. For example if i write in the editbox "6" then the dbgrid shoul run down to the numbers starting with 6 etc.
A simple tip about the right command i think it would be enough.
I want to add a code in my database application, that can search for a string like a telephone number and then the number in the dbgrid receive focus.
More specific :
I would like something like a quick search where i put a letter or 2 in an editbox and then the dbgrid scroll down to that number. For example if i write in the editbox "6" then the dbgrid shoul run down to the numbers starting with 6 etc.
A simple tip about the right command i think it would be enough.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok i found something about locate method thank you very much. Hope it works.
ASKER
Delphi syntax:
function Locate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions
): Boolean; virtual;