Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net jqgrid表单编辑在格式化程序中包装时返回服务器错误_Asp.net_Asp.net Mvc 3_Jqgrid - Fatal编程技术网

Asp.net jqgrid表单编辑在格式化程序中包装时返回服务器错误

Asp.net jqgrid表单编辑在格式化程序中包装时返回服务器错误,asp.net,asp.net-mvc-3,jqgrid,Asp.net,Asp.net Mvc 3,Jqgrid,作为这个问题的后续问题。。。我有一个网格,其中一个单元格作为复选框和表单编辑。我能够使用此解决方案加载单元格的值,但在提交时,它会传回格式化程序引号中的所有内容,并引发服务器错误。我怎样才能传回1:0的值呢 从网格线 { name: 'NS', index: 'NS', width: 20, editable: true, hidden: false, edittype: 'checkbox', editrules: { edithidden: true, required: true },

作为这个问题的后续问题。。。我有一个网格,其中一个单元格作为复选框和表单编辑。我能够使用此解决方案加载单元格的值,但在提交时,它会传回格式化程序引号中的所有内容,并引发服务器错误。我怎样才能传回1:0的值呢

从网格线

 { name: 'NS', index: 'NS', width: 20, editable: true, hidden: false, edittype: 'checkbox', editrules: { edithidden: true, required: true }, formoptions: { rowpos: 11}, formatter: checkTrue }
使用的格式化程序

formatter: function (cellvalue, options, rowdata) {
if (cellvalue == 0) {
    return "<span class=\"ui-icon ui-icon-close\">0</span>";
} else {
    return "<span class=\"ui-icon ui-icon-check\">1</span>";
}
格式化程序:函数(单元格值、选项、行数据){
如果(cellvalue==0){
返回“0”;
}否则{
返回“1”;
}
}您可以使用

不可格式化事件采用以下参数:

cellvalue - the value to be unformatted.  
options - An object that contains the row id and column model  
cellobject - A JQuery cell object.

您应该将
unFormat:unFormat
更改为
unFormat:unFormat
。绝对!我应该在文档中更仔细地查看!!
cellvalue - the value to be unformatted.  
options - An object that contains the row id and column model  
cellobject - A JQuery cell object.