ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: eloan on April 24, 2020, 01:43:51 pm

Title: An error occurs when refreshDataAndView is called in IE.
Post by: eloan on April 24, 2020, 01:43:51 pm
Hi.

Please help me.

I have upgraded the version of pqgrid from 3.3.4 to 7.0.0.
Then I get an error and am in trouble.

I used refreshDataAndView method.
Then, an error occurs in IE.
Call t at line 557 of pqgrid.dev.php, but t is undefined.

It does not occur in chrome or firefox.

It can be confirmed by displaying the "test simple html" below in the IE browser and "IE developer tool" and clicking the "refresh" link.

Best regards.

=== test simple html ===
<body>
<a href="#" onclick="refresh(); return false;">reload</a>
<div id="testGrid"></div>
<script>
function refresh() {
   $("#testGrid").show();
   $("#testGrid").pqGrid('option', 'dataModel.location', "remote");
   $("#testGrid").pqGrid('option', 'dataModel.postData', []);
   $("#testGrid").pqGrid('refreshDataAndView');
}

$(function() {
   var colModel = [{"title":"ID","dataType":"string","dataIndx":"id"}
            ,   {"title":"name","dataType":"string","dataIndx":"name"}
            ];
   var dataModel = {"location":"remote"
               ,"dataType":"JSON"
               ,"method":"POST"
               ,"url":"https:\/\/paramquery.com\/pro\/orders\/get"};

   var obj = {"width":"auto","height":"400","minHeight":"200","showTitle":true,"stripeRows":true,"showTop":false};
   obj.colModel = colModel;
   obj.dataModel = dataModel;
   var grid = $("#testGrid").pqGrid(obj);
   
});
</script>
</body>
==================
Title: Re: An error occurs when refreshDataAndView is called in IE.
Post by: paramvir on April 27, 2020, 09:06:09 am
Please mention version of IE, jQuery and jQueryUI.
Title: Re: An error occurs when refreshDataAndView is called in IE.
Post by: eloan on April 27, 2020, 09:23:13 am
IE version is 11.(debug mode 9 - 10, edge)
jquery version is 1.8.3
jquery-ui version is 1.12.1
Title: Re: An error occurs when refreshDataAndView is called in IE.
Post by: paramvir on April 27, 2020, 11:52:46 am
dataModel.postData is not an array but a plain object or a function.

Please correct this

Code: [Select]
$("#testGrid").pqGrid('option', 'dataModel.postData', []);

to

Code: [Select]
$("#testGrid").pqGrid('option', 'dataModel.postData', {});
Title: Re: An error occurs when refreshDataAndView is called in IE.
Post by: eloan on April 27, 2020, 01:53:02 pm
Thank you very much.
The problem is resolved.
It was helpful.