dataSource: {
transport: {
read: function(options){
options.success(data); // where data is the local data array
},
transport: {
read: function(options){
options.success(data); // where data is the local data array
},
...
//use ajax in kendo ui update function
update:
function(options) { $.ajax({ type:
"POST", url:
"<my_url>", data: options.data, dataType:
"json", success:
function(data, textStatus, jqXHR) { options.success(data, textStatus, jqXHR); }, error:
function(jqXHR, textStatus, errorThrown) { options.error(data, textStatus, jqXHR); }, });}
KendoUI 数据更新实践
本文介绍如何使用 KendoUI 的 dataSource 更新本地数据,并通过 AJAX 实现服务器端的数据同步。具体包括配置 dataSource 的 transport 对象来定义读取及更新操作,以及如何在 update 函数中设置 AJAX 请求的类型、URL 和回调函数。
2029

被折叠的 条评论
为什么被折叠?



