Solved

Searching a dbgrid

Posted on 2000-04-26
2
218 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now