开发者

jQuery 1.6.3 checkboxes issue in inline edit in jQgrid

开发者 https://www.devze.com 2023-04-03 13:44 出处:网络
I just updated jQuery from 1.6.2 to 1.6.3 and find out that inline edit not working properly after that change.

I just updated jQuery from 1.6.2 to 1.6.3 and find out that inline edit not working properly after that change.

I have check boxes and if I untick checkbox(value true switched to false) and click save, the value of that tickbox posted as true on controller but real value should be false because i开发者_开发问答 changed that. Also if the value was 'false' (checkbox unchecked) and I change it to checked(true) it is working this way. So i it is only not working from checked to unchecked only(when i am unchecking the checkbox the value true always posted on server instead of 'false').

When I switched back to jQuery 1.6.2 all working as before, no issues with checkboxes.

My jQGrid version 4.1.2.

Is is a bug with jQuery 1.6.3?


Thank you for the question! In one project for my main customer the working with checkbox is very critical. So I reproduced immediately the problem. My first bug fix is the following:

one should change the line 133 (in the version 4.1.2) of the grid.inlinedit.js or the line 8283 of the jquery.jqGrid.src.js from

tmp[nm]=  $("input",this).attr("checked") ? cbv[0] : cbv[1];

to

tmp[nm]=  $("input",this)[0].checked ? cbv[0] : cbv[1];

I think one should examine the jqGrid code for more places where are worked with checkboxes, but the quick fix described above at least solve the problem in inline editing which you described. I will examine the problem more carefully later and will post my suggestions to trirand (to the developer of jqGrid).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号