日期:2014-05-16 浏览次数:20376 次
<script type="text/javascript">
var manager;
$(function ()
{
manager = $("#maingrid").ligerGrid({
columns: [
{ display: '部门名', name: 'name', width: 250, align: 'left' },
{ display: '部门标示', name: 'id', id:'id1',width: 250, type: 'int', align: 'left' },
{ display: '部门描述', name: 'remark', width: 250, align: 'left' }
], width: '100%', pageSizeOptions: [5, 10, 15, 20], height: '97%',
data: TreeDeptData, alternatingRow: false, tree: { columnId: 'id1' }
}
);
});
</script>
</head>
TreeDeptData.js
<div id="maingrid"></div>
<div>
var TreeDeptData = { Rows : [
{ id: '01', name: "企划部", remark: "1989-01-12",
children: [
{ id: '0101', name: "企划分部一", remark: "企划分部一"
},
{ id: '0102', name: "企划分部二", remark: "企划分部二", children:
[
{ id: '010201', name: "企划分部二 A组", remark: "企划分部二 A组" },
{ id: '010202', name: "企划分部二 B组", remark: "企划分部二 B组" }
]
},
{ id: '0103', name: "企划分部三", remark: "企划分部三" }
]
&nbs