ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: EPM Solutions on December 28, 2017, 03:29:39 pm
-
Hello Team,
We are passing data to dataModel.data dynamically and sometime the data is empty and in this situation it gives error and the grid is not working properly.
On Load if we pass empty data it is working fine but when i apply custom filter on the grid and if there is no data in the array it gives error.
Please check the below code.
var exData = [];
$("#grid_Executing").pqGrid("option", "dataModel.data", exData);
$("#grid_Executing").pqGrid('refreshView');
For reference i created one JsFiddle please check the below URL and for produce the error please click on the Empty Data button and see error in console.
JSFiddle URL : http://jsfiddle.net/h4rmbx70/26/
Please check above URL and give your suggestion on this.
-
When there is no data it should be [] instead of null or undefined.
And call refreshDataAndView instead of refreshView.
$("#grid_array").pqGrid("option", "dataModel.data", empty_data || []);
$("#grid_array").pqGrid('refreshDataAndView');
-
Thanks... :)
It's working fine 8) ;D :D ;) :)