Anyway to automatically refresh the grid every minute or so?

QuestionsAnyway to automatically refresh the grid every minute or so?
Mike Olson asked 2 years ago

wondering if there isa way to refresh the entire grid every so many seconds.

4 Answers
Mike Olson answered 2 years ago

Ah never mind I found it.

 

Thanks!

Mike Olson answered 2 years ago

However, I am wondering if there is a way to put a custom button on the grid that can be used to control the java script to pause and start the auto refresh?

Gert answered 2 years ago
and what is the solution to this
Abu Ghufran Staff answered 2 years ago

If you wish to auto reload grid at e.g. 2 min interval, you can call this JS code.

setInterval("jQuery('#list1').trigger('reloadGrid',[{page:1}]);",2000);

If you wish to start/stop it on some toolbar button, You need to refer:

– Add toolbar button: https://www.gridphp.com/demo/demos/appearance/toolbar-button.phps Line 122
– Enable / Disable timer: https://www.w3schools.com/jsref/met_win_clearinterval.asp

In case of any issue, Please share the code and I’ll recommend the changes.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

6 + 13 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?