jQuery MiniUI
标题:
如何在js中加载json字符串到datagrid中?
[打印本页]
作者:
boolean
时间:
2014-2-19 10:13:17
标题:
如何在js中加载json字符串到datagrid中?
如题:如何在js中加载json字符串到datagrid中?html:
<div id="datagrid1" class="mini-datagrid" style="width:700px;height:280px;"
idField="bearname" allowResize="true" multiSelect="true">
<div property="columns">
<div type="indexcolumn" ></div>
<div field="bearname" width="160" >板块名称</div>
<div field="fundsource" width="80">经费来源</div>
<div field="type" width="60" align="right">项目类型</div>
</div>
js:
var txt = {
total:35,
data:[{
"bearname":"11111",
"fundsource":"aaaaa",
"type":"qq"
},
{
"bearname":"222222",
"fundsource":"sssssss)",
"type":"ww"
}
]};
mini.get("datagrid1").什么方法能将json字符串加载到datagrid中显示
作者:
felt
时间:
2014-2-19 10:20:10
mini.get("datagrid1").setData(txt.data);
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/)
Powered by Discuz! X2