Author Topic: An error occurs when updateRow is called in IE.  (Read 2531 times)

eloan

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 25
    • View Profile
An error occurs when updateRow is called in IE.
« on: April 27, 2020, 08:32:21 am »
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 updateRow method.
Then, an error occurs in IE.
Call x at line 7015 of pqgrid.dev.php, but x is undefined.

The operation I performed is the content of "test simple html".
In this case, "e is undefined" occurs at line 1840.
The difference with what I want to do is that the data location is local or remote.

Best regards.

=== test simple html ===
<body>
<div id="testGrid"></div>
<script>
function custRender(ui) {
   return { text: "<div><input id='r1' type='radio' value='0' onchange='valChange(this);' /><label for='r1'>OK</label>"
               +   "<input id='r2' type='radio' value='1' onchange='valChange(this);' /><label for='r2'>NG</label></div>" }
}
function valChange(obj) {
   var ary   = [];
   ary["ContactName"] = obj.value;
   $("#testGrid").pqGrid("updateRow", { rowIndx: 0, newRow: ary, checkEditable:false});
}
$(function() {
   var colModel = [{"title":"ID","dataType":"string","dataIndx":"OrderID"}
            ,   {"title":"name","dataType":"string","dataIndx":"ContactName","width":150, "render":function(ui) { return custRender(ui); }}
            ];
   var dataModel = {"location":"local"
               ,"dataType":"JSON"
               ,"data": [{ "OrderID":"1", "ContactName":""}]};

   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>
==================

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: An error occurs when updateRow is called in IE.
« Reply #1 on: April 27, 2020, 09:05:40 am »
Please mention version of IE, jQuery and jQueryUI.

eloan

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: An error occurs when updateRow is called in IE.
« Reply #2 on: April 27, 2020, 09:26:03 am »
IE version is 11.(debug mode 9 - 10, edge)
jquery version is 1.8.3
jquery-ui version is 1.12.1

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: An error occurs when updateRow is called in IE.
« Reply #3 on: April 27, 2020, 11:59:32 am »
Please correct

Code: [Select]
var ary   = [];

to

Code: [Select]
var ary   = {};

eloan

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: An error occurs when updateRow is called in IE.
« Reply #4 on: April 27, 2020, 01:56:10 pm »
Thank you very much.
The problem is resolved.
It was helpful.