drnadeem
asked on
Stringgrid value validation
When I want to enter a value into a string grid cell (eg: StringGrid1.Cells[2,1]) I want to check whether that same value exists either in the same column or in the same row. It's some kind of a validation process whereby, I would be able to assign some value to the cell if only the same value does not exist in the same column or row.
sorry for my English.
thnks
sorry for my English.
thnks
working sample may follow . . .
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I haven't read the entire question with comments, but if you want to search through a row or a column i guess you can use IndexOf. StringGrid1.Rows[xx].Index Of('search text');
And again, i don't know whether this have been suggested by kretzs.. !
And again, i don't know whether this have been suggested by kretzs.. !
//for same row
if stringgrid1.rows[rowindex]
showmessage('Exists Already');
//for same column
if stringgrid1.cols[colindex]
showmessage('Exists Already');
just as kickoff
(just clear and save your current input before validating)
not sure about syntax->just from head
meikl ;-)