oberdan
asked on
DBGrid Cells
How to get the data of ONE cell of one DBGrid, to check in a table if this data already exists?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
As itamar I don't fully understand the question, but here is a suggestion :
How to get data of one cell?
Well to get data from one cell you need to know which row and which column is selected :
1. Row : is the active record of the table
2. Column : is the selected field of the dbgrid.
To get that value :
CellString = Table1.GetFieldByName(dbGr id1.Select edField.Fi eldName).A sString
or CellValue =
Table1.GetFieldByName(dbGr id1.Select edField.Fi eldName).A sInteger
or ... depending on what type of field. You can check this with
FIELDTYPE property of TField.
Having this data you can check in another table if it already exists with the normal search routines.
Have fun,
c.u. ZifNab;
How to get data of one cell?
Well to get data from one cell you need to know which row and which column is selected :
1. Row : is the active record of the table
2. Column : is the selected field of the dbgrid.
To get that value :
CellString = Table1.GetFieldByName(dbGr
or CellValue =
Table1.GetFieldByName(dbGr
or ... depending on what type of field. You can check this with
FIELDTYPE property of TField.
Having this data you can check in another table if it already exists with the normal search routines.
Have fun,
c.u. ZifNab;
Thanks...