- 注册时间
- 2016-7-28
- 最后登录
- 1970-1-1
- 阅读权限
- 10
- 积分
- 314
- 精华
- 0
- 帖子
- 77
 
|
本帖最后由 三点水 于 2016-7-29 14:36 编辑
第一种方法能生成treegrid,第二种就不可以了
第一种:url在div中<div id="treegrid1" class="mini-treegrid" style="width:700px;height:300px;" url='shuju.txt' showTreeIcon="true"
treeColumn="taskname" idField="UID" parentField="ParentTaskUID" resultAsTree="false"
allowResize="true" expandOnLoad="true"
>
第二种:url在ajax方法中
<div id="treegrid1" class="mini-treegrid" style="width:700px;height:300px;"
showTreeIcon="true"
treeColumn="taskname" idField="UID" parentField="ParentTaskUID" resultAsTree="false"
allowResize="true" expandOnLoad="true"
<script type="text/javascript">
mini.parse();
var grid = mini.get("treegrid1");
var dataResult = null;
$.ajax({
url: 'shuju.txt',
dataType: 'text',
async: false,
success: function (text) {
dataResult = mini.decode(text);
}
});
grid.setData(dataResult);
</script>
|
|