Closed tokick4 closed 11 years ago
When do you wanna refresh it? If its on an interval you can simply do
$(".grid").on("loadComplete",function() {
var self = this;
setInterval(function() {
$(self).grid("load");
},5000);
});
Be cool if the changes were pushed instead of pulled.
For that - You need my other tool RealTime. http://connectai.com/realtime it would allow php or js to trigger changes to be pushed to the grid. Which wouldn't even need a refresh, you could just insert rows. Or refresh.
You need to hire a team of people to write tutorials using your fantastic tools.
I have a problem with this it is running but then it multiples the call and after the 4th time it hangs the load logo and then hangs up and calls about 83 events.
sorry I cannot get the code to go in correctly so I had to take a screen shot.
oh, right. Yes. Because it calls grid load over and over again, then calls itself. Take the setInterval OUT of the loadComplete.
So inside just do $grid.grid("load"); instead of $(self)
@iconner ha, thanks. Yea I wanna spend some quality time with RealTime. I'm using it for a lot of my clients now, hard to finish the consumer version.
if the setInterval is removed how doe it fire off every 5sec.
Remove that whole piece from the loadComplete. So after all the grid call, you will just do
setInterval(function() {
$grid.grid("load");
},5000);
thanks i just figured it out with trial and error. You are awesome thanks for the help and this grid after working with it I am starting to like it and getting use to it after messing with it all day.
Thanks again
My pleasure. Thanks for using it!
question how do you add code to this what is the comments before and after to insert code
4 spaces before you start type, and then a line break before and after
this is 4 spaces
Here is a link to all the syntax you can do http://github.github.com/github-flavored-markdown/
I was wondering if you have any methods that allows for the grid to auto-refresh or is there a way to set it up. I am pulling data from MySQL using AJAX and I want to set a time to refresh the grid with new data.
Thanks for the help so far.