Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Search - find in Dbgrid

Posted on 2003-11-04
3
Medium Priority
?
300 Views
Last Modified: 2010-04-05
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.
0
Comment
Question by:CodedK
  • 2
3 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 70 total points
ID: 9682352
just use the locate-method of the underlying dataset
(of course partial locate woks only with stringfields)

see online help about locate

meikl ;-)
0
 
LVL 16

Author Comment

by:CodedK
ID: 9682501
Do you mean this?

Delphi syntax:

function Locate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions
): Boolean; virtual;
0
 
LVL 16

Author Comment

by:CodedK
ID: 9682567
ok i found something about locate method thank you very much. Hope it works.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question