asp.net应用jqgrid的编辑、增加、删除功能完成后客户端如和判断服务器端处理是否成功
asp.net使用jqgrid的编辑、增加、删除功能完成后客户端如和判断服务器端处理是否成功
asp.net服务器端的处理后,如何返回个客户端成功与否信息?
谢谢
------解决方案--------------------
添加afterSubmit事件通过ajax对象获取返回值进行判断就行了
asp.net服务器端的处理后,如何返回个客户端成功与否信息?
谢谢
------解决方案--------------------
添加afterSubmit事件通过ajax对象获取返回值进行判断就行了
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<link href="css/jquery-ui-1.8.2.custom.css" rel="stylesheet" type="text/css" />
<link href="css/ui.jqgrid.css" rel="stylesheet" type="text/css" />
<script src="js/jquery.js" type="text/javascript"> </script>
<script src="js/i18n/grid.locale-en.js" type="text/javascript"></script>
<script src="js/jquery.jqGrid.min.js" type="text/javascript"> </script>
<script type="text/javascript">
$(document).ready(function () {
$("#list4").jqGrid({
url: "read.ashx",
datatype: "json",
editurl: "save.ashx",//////保存路径
mtype: 'get',
height: 300,
colNames: ['编号', '姓名', '日期', '地点'],
autowidth: false, //自动设置宽度
rownumbers: true,
closeAfterSearch: true,
colModel: [{ name: "id", index: "id", sorttype: "int", width: 60, editable: false, search: true },
{ name: "xm", index: "xm", sorttype: "text", width: 100, search: true, editable: true },