Solved

Searching a dbgrid

Posted on 2000-04-26
2
224 Views
Last Modified: 2010-04-04
I am using Delphi5 pro.
I am searching a dbgrid using the TDataset.Locate method.
How do I find the next occurance of the searched text after the first is located?

Thanks for your help,
Ivan
0
Comment
Question by:icarey
2 Comments
 
LVL 1

Accepted Solution

by:
msedi earned 100 total points
ID: 2750950
Hello,

as far as I know there's no possibility to go to the next record. Maybe you can use a filter and then step through all found items. Or you do it by hand with
 

  while (not Table.EOF) do
  begin
    // Search method here
    Table.Next;  
  end;

Good luck, Martin
0
 
LVL 1

Expert Comment

by:bozo7
ID: 2751279
Locate only finds the first occurence of the value. To do a find next you need to use TDataset.FindFirst then use TDataSet.FindNext.

Ross
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…

821 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