2012. 8. 6. 19:12 IT


var timeoutHnd;


...

$(GRID_ID).jqGrid({

...

loadComplete: function(){

if(timeoutHnd){ // 기존 핸들은 clear

clearTimeout(timeoutHnd);

}

if( $(GRID_ID).jqGrid("getGridParam", "records")>0){ // 한건이라도 있으면.. 

timeoutHnd = setTimeout(function () { $(GRID_ID).trigger('reloadGrid'); },10000);

}

},

               ...


// has any issue?

posted by smplnote