1
Help for ParamQuery Pro / Filter not working after Ajax Call
« on: December 22, 2015, 12:54:34 pm »
Hello,
I trying to use Header filtering. If I bring the data using spaghetti code and insert it into pqgrid at time of grid declaration, the filter works fine. However, if I bring the data using an Ajax call and insert it into the datamodel later, the filter is not working. In this case data is set as []; at time of grid declaration. Am I missing any refresh for the filter? I am using 2.0.4 version.
Please find below my code of the ajax call:
Thanks,
SVK
I trying to use Header filtering. If I bring the data using spaghetti code and insert it into pqgrid at time of grid declaration, the filter works fine. However, if I bring the data using an Ajax call and insert it into the datamodel later, the filter is not working. In this case data is set as []; at time of grid declaration. Am I missing any refresh for the filter? I am using 2.0.4 version.
Please find below my code of the ajax call:
Code: [Select]
$.ajax({
type: "POST",
url: "F1910.aspx/bindGrid1",
data: '{"apprlvl":"' + appr + '"}',
processData: false,
contentType: "application/json",
dataType: "json",
async: true,
cache: false,
success: function (msg) {
var obj = eval(msg.d);
$("#grid_json").pqGrid("option", "dataModel", { data: obj, sorting: "local",sortIndx: ["uckalerts","pono", "posrno"], sortDir: ["down","up","up"]});
$("#grid_json").pqGrid("refreshDataAndView");
},
error: function (x, e) {
alert("The call to the server side failed. " + x.responseText);
}
});
Thanks,
SVK