Page 1 of 1

Connecting a TSmartQuery to more than one Data Provider and Grid

Posted: Thu 23 Aug 2007 16:52
by Graham_Allan
Hi All

I'm currently developing a GIS application that interacts with an Oracle database. I'm trying to do something like this:

Database--Query ----Form 1--Data Source-Grid
Table \
\--------Form 2--Data Source-Grid

The idea being that if I edit data in form 1 it is shown as edited in form 2 when I exit the record rather than having to re-query. This currently works but both grids scroll simultaneously.

Is it possible to keep the editing linked but allow the two grids scroll independently? Ideally the active record would still remain highlighted in both grids, even if it’s not visible in one of the forms.

It looks like the cursor position, bookmarking and scrooling through the dataset are controls by the query not the grid - is there any way arround this?

If anyone is familiar with MapInfo I'd like something like the editing that is available there.

Thanks


Graham

Posted: Mon 27 Aug 2007 07:46
by Plash
The TDBGrid component always positions itself on the current record in the query. When you move the cursor in the TDBGrid component, it changes the current record in the dataset. So it is impossible to scroll throug a DB-grid regardless of the underlying dataset.