?
Solved

Search - find in Dbgrid

Posted on 2003-11-04
3
Medium Priority
?
298 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

718 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