开发者

jQGrid checkbox values

开发者 https://www.devze.com 2023-03-11 22:42 出处:网络
I have an editable checkbox in my jQGrid with the values editoptions: { value: \"Yes:No\" } But whatever the value is i am getting back on controller string value \"Yes:No\", not single value \"Yes\

I have an editable checkbox in my jQGrid with the values

editoptions: { value: "Yes:No" }

But whatever the value is i am getting back on controller string value "Yes:No", not single value "Yes" of "No", so i am getting it like that:

When it is checked i am getting this:

form["MyCheckBox"] = "Yes:No".

When it is not checked开发者_如何学运维 i am getting this:

form["MyCheckBox"] = "No".

How can i do to make it work? Or is there any way to get bool values(true/false) instead of string values ?

Need help


Try this:

editoptions: { value:"True:False" }, editable:true, edittype:'checkbox', 
formatter: "checkbox", formatoptions: {disabled : false}


It seems to me you describe the bug which is already fixed in the last version of jqGrid from GitHub. I recommend you to download the version from here. See here for the description of the order of the including of the jqGrid moduls.

0

精彩评论

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