Home › Forums › Guriddo jqGrid JS › Help › Table Refresh?
Hello,
I'm new to jqGrid and I'm having a little trouble.
I'm trying to constantly refresh a changing data source.
Here's my code:
Hello
$(”#mygrid”).jqGrid({…..});
setInterval(function() { $(”#mygrid”).trigger(”reloadGrid”);},5000);
Also search this forum, there is a working exmple here.
Regards
Tony
ahh…sorry, I forgot to mention, I want to load and use the xml file for processing in addition to jqGrid. In other words, grab the file and process it using jqGrid and then process it using something else to present non-grid data.
Thanks again in advance,
Chris
Hell,
As you see here you try to CREATE every time the grid after some interval – right?
This will not work after first time since there is a checking if the grid exists.
If the grid exists and you try to create it again nothing will be happen.
In you case I recommend you to check if the grid exist first
also in your ajax function
if(grid does not exists) {
//create the grid here
} else {
// triger to reload the grid
}
To check if the grid exists:
var mygrid
Stay connected with us in your favorite flavor!
Copyright 2014 TriRand LtdAll Rights ReservedRSS