Refresh Datagrid on JavaScript Event.

thread: 3 messages  |  last: a year ago  |  started: tuesday, june 15, 2010, 2:53 pm pdt


#1  |  Gustavo Pilla (Quilmes, BsAs) Argentina
Tuesday, June 15, 2010, 2:53 PM PDT

Hello, i want to know how can i refresh a QDataGrid with JavaScript.

For example, i want to refresh a QDataGrid, every 5 minutes.

The question, can be more complex saying ... how can i trigger events with JavaScript.

#2  |  Gustavo Pilla (Quilmes, BsAs) Argentina
Tuesday, June 15, 2010, 4:46 PM PDT

Hi again,

I had found this:

http://examples.qcodo.com/examples/other_controls/polling.php

Wich will solve the problem of refreshing every 5 minutes.

But I have another issue. There is something to make a QOnPageLoadEvent ?... just to trigger some event, when the page finishes the rendering.

In an usefull example. I will do a Query... wich i know that will take a lot!!!... no solution for that, then render all the page content (with out the data of the datagrid)... and when everything is rendered... trigger to Refresh the QDataGrid via Ajax.

What do you think?

#3  |  Mike Ho (Sunnyvale, CA) United States of America Qcodo Administrator
Wednesday, June 16, 2010, 6:34 AM PDT

Polling should execute your eventhandler method right away.  So even if you put your polling interval at 5 minutes... it will immediately execute right away via an ajax call... and then it will repeat execution every 5 minutes.



Copyright © 2005 - 2012, Quasidea Development, LLC
This open-source framework for PHP is released under the terms of The MIT License.