Board index » delphi » How in DBGrid move row which I need into vision area

How in DBGrid move row which I need into vision area

Hi all

I have  a question :        How in DBGrid move row which I need into vision
area. Example : "Search" and  "Goto" function
I must not to use TQuery. Only TTable.
Is there such thing as POINTER(or property) ON top ROW in dbgrid? (which I
want to move on searching string in the connectted
table in database!)

Beforehands thanks
Stas Kirov
ki...@mail.ru

 

Re:How in DBGrid move row which I need into vision area


Quote
>Hi all

>I have  a question :        How in DBGrid move row which I need into vision
>area. Example : "Search" and  "Goto" function
>I must not to use TQuery. Only TTable.
>Is there such thing as POINTER(or property) ON top ROW in dbgrid? (which I
>want to move on searching string in the connectted
>table in database!)

>Beforehands thanks
>Stas Kirov
>ki...@mail.ru

If I understand you correctly you want to move to a certain row in your DBGrid
right?  Using a table object you can do this:

Table1.First;
repeat
     Table1.Next;
until Table1.FieldByName('YourField').AsString := 'YourValue';

Obviously you need to change the FieldByName property to the name of the field
you want to search and the value you are searching for.
This should find the row you are looking for.
********************************
Michael Glatz
glatzfa...@aol.com
mgl...@briefcase.com

Other Threads