Rajkiran
asked on
Selecting rowitem of dbgrid in delphi
dear friends,
i want to access one item of row in dbgrid.
in deplhi i can access column by writing dbgrid1.column.items[0]..
it will fetch column only.
but i want to access row item for particular column.
how can i do that?
Please help me in this question?
Regards,
Rajkiran.
i want to access one item of row in dbgrid.
in deplhi i can access column by writing dbgrid1.column.items[0]..
it will fetch column only.
but i want to access row item for particular column.
how can i do that?
Please help me in this question?
Regards,
Rajkiran.
ASKER
Thanks a lot igor.
Rajkiran.
Rajkiran.
One solution is to go move your dataset to the appropriate row(record) and then to use dbgrid1.datasource.dataset .fieldbyna me('your_f ield').As? ??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
dear ratje,
thank you for providing solution.
i used this.
it solved my problem.
Regards,
Rajkiran.
thank you for providing solution.
i used this.
it solved my problem.
Regards,
Rajkiran.
ROW property of TDBGrid is not published, so, you can't access it directly.
TDBGrid does not store data row by row, it has different logic.
To access data with specified row number you have to access it in dataset instead of grid. Use .First .Last .Next .Prior methods of dataset to set cursor to desired record number (ROW as you called it).
____
Igor