<script>
$(function(){
$('#treegrid').treegrid({
title:'菜单管理',
iconCls:'icon-save',
nowrap: false,
rownumbers: true,
animate:true,
collapsible:false,
url:'default.aspx',
idField:'id',
treeField:'text',
toolbar:"#searchBox",
queryParams: { "action": "query" },
frozenColumns:[[
{ title:'id',field:'id',width:80,align:'center'
}
]],
columns:[[
{field:'text',title:'名称',width:150},
{ title: '操作',field: 'id0',align:'center',width: 120,formatter: function (value,rec) {
return "<a href=\"javascript:;\" style=\"color:#000\">修改</a>";
}
}
]],
onBeforeExpand:function(row,param){
$(this).treegrid('options').url = 'default.aspx?bid='+row.id;
}
});
});
[
{
"id": 1350,
"pid": 1325,255)">
"text": "综合演示",255)">
"state": "closed",255)">
"iconCls": "icon-book",255)">
"url": ""
},255)">
"id": 1327,255)">
"text": "表单组件",255)">
"iconCls": "icon-layout_sidebar",255)">
"id": 1328,255)">
"text": "表格组件",255)">
"iconCls": "icon-database_table",255)">
"id": 1329,255)">
"text": "菜单按钮",255)">
"iconCls": "icon-piechart",255)">
"id": 1330,255)">
"text": "图形报表",255)">
"iconCls": "icon-chart_bar",255)">
"id": 1331,255)">
"text": "扩展组件",255)">
"iconCls": "icon-calendar",255)">
}
]
"id": 1356,255)">
"pid": 1350,255)">
"state": "open",255)">
"iconCls": "",255)">
"text": "数据表格",255)">
"url": "./html/complex/datagrid.html"
"id": 1357,255)">
"text": "树形表格",255)">
"url": "./html/complex/treegrid.html"
"id": 1358,255)">
"text": "可编辑表格",255)">
"url": "./html/complex/edatagrid.html"
"id": 1359,255)">
"text": "左右布局的双表",255)">
"url": "./html/common/waiting.html"
"id": 1360,255)">
"text": "上下布局的双表",255)">
"id": 1349,255)">
"text": "左上下布局的三表",255)">
"id": 1361,255)">
"text": "左中右布局",255)">
"url": "./topjui/image/icons/index.html"
]