我在jquery网络应用中设置复选框时遇到了一些问题。我的json看起来如下。我希望deadInd是一个复选框(Y或N)......
{
"userid": "Mike",
"regname": "xxx219123",
"noteid": 1040,
"actiondt": "2014-11-20T00:00:00",
"fromdt": "2014-11-18T00:00:00",
"note": "Faulty drawer",
"reasoncde": "AC",
"deadind": "N",
"lastmodified": "2014-11-18T15:38:27"
},
我的专栏如下。请参阅deadInd列...
colModel:[
{name:'regname', width: 12, align:'center', sortable:false},
{name:'reasoncde', width: 10, align:'center', sortable:false, formatter:reasonCodeFormatter},
{name:'userid', width: 12, align:'center', sortable:false},
{name:'noteid', hidden:true},
{name:'note', width: 40, align:'left', sortable:false},
{name:'fromdt', width: 12, align:'center', sortable:false, formatter:dateToTimestampStringFormatter},
{name:'actiondt', width: 12, align:'center', sortable:false, formatter:dateToTimestampStringFormatter},
{name:'deadind', width: 10, align:'center', sortable:false, editable: true, edittype: 'checkbox', editoptions:{value:"Y:N", defaultValue: "N"}, formatter: "checkbox", formatoptions:{disabled: false} },
{name:'lastmodified', width: 17, align:'center', sortable:false, formatter:timestampStringFormatter}
],
出于某种原因,始终勾选复选框。根据我的理解,因为N被指定为editOptions中的第二个值,我认为我的复选框应该是未选中的。
感谢您的帮助。
感谢