1
大家好,我對Kendo UI Grid組件變得瘋狂了。我正在使用dataSource.transport.read在GET中加載JSON Jersey服務。該代碼是這樣的:Kendo UI數據源傳輸讀取忽略數據參數
var args = new Object();
args.procomfilter = "058091_054051";
args.userGrid = "false";
args.take = "20";
args.skip = "0";
args.row = "Comuni";
var _dataSourceGrid = new kendo.data.DataSource({
pageSize: 20,
serverPaging: true,
serverSorting: true,
serverFiltering: true,
transport: {
read:{
type: "GET",
url: "services/viewData/filtracomuni" ,
data: JSON.stringify(args),
cache: false } } ....
var _grid = $(gridId).kendoGrid({
dataSource: _dataSourceGrid,
columnMenuInit: function(e) {
var item = e.container.find(".k-columns-item");
item.prev(".k-separator").remove();
item.remove();
},
width: "100%",
height: "100%",
toolbar: kendo.template($(gridId+"Template").html()),
resizable: true,
//sortable: true,
columnMenu: !userGrid,
...
上螢火我看到參數表是完全忽略
但如果我直接撥打電話:
$(_gridId).kendoGrid({
dataSource: {
transport: {
read: {
type: "POST",
url: "services/viewData/filtracomuni",
data: JSON.stringify(args)
}
}
}
});
它的工作原理,爲什麼? 非常感謝
thak你了 – djonthenet