Re: Database (sorry bout the last 1)

Posted by webmaster Guido on June 19, 2003 at 19:16:26:

In Reply to: Database (sorry bout the last 1) posted by Joey on June 15, 2003 at 22:33:59:

: I was just wonderin how to check a column in a grid for text then checking if the value in the column next to it was the same as nother box.

: Example:
: edit1 = joey
: edit2 = hello

: it checks one colum for joey and the column next to it for hello and if there next to each others lets you do something!
--------

If you use a StringGrid component, you can get the strings with the property Cells[Column, Row]. Example: check the strings of the first row, in the first and the second column:

with StringGrid1 do
if (Cells[0,0] = 'joey') and (Cells[1,0] = 'hello') then
...

Note: row and column numbers start at 0.


[ Delphi Forum ]
[ DelphiLand: free Delphi source code, tips, tutorials ]