jQuery MiniUI
标题:
关于保存DataGrid
[打印本页]
作者:
jhp
时间:
2017-1-11 09:18:25
标题:
关于保存DataGrid
例如下面的保存,能不能只获取修改的列,没有修改的列不用获取?
function saveData() {
var data = grid.getChanges();
var json = mini.encode(data);
grid.loading("保存中,请稍后......");
$.ajax({
url: "../data/AjaxService.aspx?method=SaveEmployees",
data: { data: json },
type: "post",
success: function (text) {
grid.reload();
},
error: function (jqXHR, textStatus, errorThrown) {
alert(jqXHR.responseText);
}
});
}
作者:
felt
时间:
2017-1-11 09:26:54
grid.getChanges("modified",true)
第一个参数 modified/added/removed/null null表示获取所有增删改的
第二个参数 true, 修改的行只获取修改的字段数据
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/)
Powered by Discuz! X2