Print Page | Close Window

timeout

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=9366
Printed Date: 10 November 2024 at 5:50am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: timeout
Posted By: minnen
Subject: timeout
Date 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.



Replies:
Posted By: wlcabral
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net