Board index » delphi » grid jumping

grid jumping

I have a grid on my form that, via a timer object, is refreshed every x
seconds. Several users are inputing data and each needs to see what the
others have entered. Anyway, when a user scrolls down the list to look
at an existing entry, the grid will jump back to the top after the
refresh. Very annoying! The user then tries to scroll down, find a
record, and look at it before the next refresh or he looses it again.
I've tried, in the timer routine, to see if the grid is the 'focused'
item, if so, record the selected record, then put the user back at that
record after the refresh. Does not work. What am I missing?
 

Re:grid jumping


Quote
"Gary MacKay" <G...@EdisonInfo.com> wrote in message

news:3B4B5192.7120C4E@EdisonInfo.com...

Quote
> I have a grid on my form that, via a timer object, is refreshed every x
> seconds. Several users are inputing data and each needs to see what the
> others have entered. Anyway, when a user scrolls down the list to look
> at an existing entry, the grid will jump back to the top after the
> refresh. Very annoying! The user then tries to scroll down, find a
> record, and look at it before the next refresh or he looses it again.

You can use Bookmarks or make a record of your key field(s) and call Locate
after your query reopens.

Bonne chance.

rb

Re:grid jumping


Quote
> You can use Bookmarks or make a record of your key field(s) and call
Locate
> after your query reopens.

Yes, but consider what to do, when the dataset of the User is in dsInsert or
dsedit and
disable and  enable the controls during the repositioning. Is much faster.

Greetings
Vimi

Quote

> Bonne chance.

> rb

Re:grid jumping


Quote
>You can use Bookmarks or make a record of your key field(s) and call Locate
>after your query reopens.

Bookmarks would defenitly be better...

BTW:  Are you're using an SQL query to fill the grid or a full TTable?

Re:grid jumping


Quote
"julia guero" <n...@mail.please> wrote in message

news:e05pkt4n9t71natkcpcqgokd3ie6r8se6k@4ax.com...

Quote

> BTW:  Are you're using an SQL query to fill the grid or a full TTable?

TTable!!?? What's that? :) No, seriously, TTable is a definite no-no for SQL
servers.

rb

Re:grid jumping


Quote
>TTable!!?? What's that? :) No, seriously, TTable is a definite no-no for SQL servers.

I guess I know that by now.... duh

But YOU know if Gary is using an SQL-Server? (I don't)

Re:grid jumping


I'm using the tAdsQuery componant from Extended Systems. Thanks for your
help. I was able to get the BookMark stuff to work fine.

- Gary

Quote
julia guero wrote:

> >You can use Bookmarks or make a record of your key field(s) and call Locate
> >after your query reopens.

> Bookmarks would defenitly be better...

> BTW:  Are you're using an SQL query to fill the grid or a full TTable?

Other Threads