Vasya Pupkin
Vasya Pupkin

Reputation: 645

jQGrid checkbox values

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

Upvotes: 1

Views: 2097

Answers (2)

Oleg
Oleg

Reputation: 221997

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.

Upvotes: 0

woggles
woggles

Reputation: 7444

Try this:

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

Upvotes: 1

Related Questions