Grid wait timer


I’m creating an application using dhmtlxGrid, part of which involves a ride queue. When a ride is entered to the queue, the time of entry is saved.

I want a column in the grid to be a “waiting time” timer, so operators can see how long a patron has been waiting for a ride. What is the best way to do this?

Two ideas I had were:

  1. A call to the server every minute or so that would return the proper wait time (kinda crappy)

  2. Getting the time once, and having the client continuously increment the timer.


Anybody have any sort of solution??

You may try to use updateFromXML() method: … atefromxml
with setInterval function.

For example:

setInterval('mygrid.updateFromXML("grid_updated.xml")', 60000)