0
我已經從一個數據源綁定數據,但它不顯示數據,我可以看到的數據來自服務器,但電網保持空一格,這是我的代碼:劍道UI電網不工作
var dts = new kendo.data.DataSource({
type: "json",
serverPaging: true,
pageSize: 20,
group: { field: 'ProductType' },
transport: {
read: {
url: "http://someurl.com", // the remove service url
dataType: "json" ,// JSONP (JSON with padding) is required for cross-domain AJAX
type: "GET",
},
parameterMap: function(options) {
return {
//Some parameters
};
}
}
});
var grid = $("#grid").kendoGrid({
dataSource: dts,
navigatable: true,
sortable: true,
audoBind: false,
height: 240,
pageable: false,
scrollable: false,
columns: [
{
field: "SKU",
width: 100,
title: "SKU"
}, {
field: "ItemDescription",
width: 150,
title: "DescriptionDescription"
}, {
field: "Quantity",
width: 80,
title: "QTY"
}, {
field: "UOM",
width: 80,
title: "UOM"
}, {
field: "UnitPrice",
width: 130,
title: "UnitPrice",
format: "{0:c}"
}, {
field: "Tax",
width: 80,
title: "Tax",
format: "{0:c}"
}, {
field: "Total",
width: 80,
title: "Total",
format: "{0:c}"
}
]
}).data("kendoGrid");
dts.read();
這是我的代碼,首先創建數據源「dts」,然後創建網格「網格」,最後我調用讀取函數「dts.read()」。 DataSource從服務器讀取數據,但不在網格上顯示。
任何幫助將不勝感激!
你可以發佈一些來自服務器的數據 – Nick