0
數據我有以下代碼沒有顯示在劍道UI電網
var entries = [
{ "value":"AAPL", "data":665.24, "shares":100 },
{ "value":"AMZN", "data":248.27, "shares":100 },
{ "value":"IBM", "data":194.85, "shares":100 },
{ "value":"CSCO", "data":19.08, "shares":100 },
{ "value":"MSFT", "data":30.82, "shares":100 },
{ "value":"INTC", "data":24.83, "shares":100 },
{ "value":"QCOM", "data":61.46, "shares":100 },
{ "value":"ORCL", "data":31.65, "shares":100 },
{ "value":"HPQ", "data":16.88, "shares":100 },
{ "value":"CRM", "data":145.18, "shares":100 }
];
var kendogridds = new kendo.data.DataSource({data:entries,
schema:{
model:{
fields:{
value:{ type:"string" },
data:{ type:"string" }
}
}
}})
$('#myupdategrid').kendoGrid({
dataSource:kendogridds,
height: 100,
columns:[{field:'data',title:'Data'},
{field:'value',title:'Value'}],
dataBound: onDataBound,
dataBinding: onDataBinding
})
我可以看到正在創建的網格,但所有的細胞是空的。任何線索爲什麼?
您曾經試圖填補'columns'所有字段?我的意思不僅是數據' – pbibergal
不,我沒有。以前我只有兩列這樣的數據,但它也沒有工作。 – allthenutsandbolts
根據此示例,您的架構模型存在問題:http://docs.kendoui.com/api/web/grid – pbibergal