Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - timeout
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

timeout

 Post Reply Post Reply
Author
Message
minnen View Drop Down
Newbie
Newbie
Avatar

Joined: 18 March 2007
Location: Belgium
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote minnen Quote  Post ReplyReply Direct Link To This Post Topic: timeout
    Posted: 21 January 2008 at 2:05am
We have a form with two reportcontrols on it. One for the master tabel and one for the detail.
When the user selects a Master the selectionchanged trigger is fired and there we lookup the detaillines for the selected master and show them in the detail reportcontrol.
This works fine.
What i want to avoid is that when the users scrolls down very vast, the trigger is fired everytime (which requires a lot creates, deletes, databaseaccess,....).
 
Is their a way to 'postpone' the trigger for a certain number of milleseconds? So the trigger would only be fired if the user stays on the same line for lets say 250 milliseconds?
 
If not, any other ideas how to do this?
 
Thanks in advance.
Back to Top
wlcabral View Drop Down
Groupie
Groupie
Avatar

Joined: 25 April 2007
Location: Brazil
Status: Offline
Points: 72
Post Options Post Options   Thanks (0) Thanks(0)   Quote wlcabral Quote  Post ReplyReply Direct Link To This Post Posted: 21 January 2008 at 12:54pm

The Basic idea is: Move the code in selectionChanged to a Timer Control and set this timer in selectionChange event.    Something like :

 

in Timer event:

      timer.enabled = false

    '  do your code

 

in selectionChangedEvent :

      timer.enabled = true

      timer.interval = 250  

 

----------------------------------------

I my case (MS foxpro) every time the selection Changes the timer is restarted, so nothing happens until the user stops the selection...

 

wlcabral
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.