87,991
社区成员
发帖
与我相关
我的任务
分享<table id="tt" title="Complex TreeGrid" class="easyui-treegrid" style="width:750px;height:250px" ></table>
<input type="button" value="SHOW" id="cc" />
<link rel="Stylesheet" type="text/css" href="jquery-easyui-1.3.4/themes/default/easyui.css" />
<link rel="Stylesheet" type="text/css" href="jquery-easyui-1.3.4/themes/icon.css" />
<link rel="Stylesheet" type="text/css" href="jquery-easyui-1.3.4/demo/demo.css" />
<script type="text/javascript" src="jquery-easyui-1.3.4/jquery.min.js"></script>
<script type="text/javascript" src="jquery-easyui-1.3.4/jquery.easyui.min.js"></script>
function showTable() {
var strJson = GetJSON().value;
//strJson=[{ "login": "login1", "10-17": "3.5", "10-18": "8", "10-19": "" }, { "login": "login2", "10-17": "", "10-18": "16", "10-19": "" }, { "login": "login3", "10-17": "1", "10-18": "", "10-19": "" }, { "login": "login4", "10-17": "73", "10-18": "", "10-19": "" }, { "login": "login5", "10-17": "25", "10-18": "11", "10-19": ""}];
$("#tt").treegrid({
rownumbers: true,
idField: 'login',
treeField: 'login',
data: strJson,
columns: [[
{ title: 'Login', field: 'login', width: '80' },
{ title: '10-17', field: '10-17', width: '80' },
{ title: '10-18', field: '10-18', width: '80' },
{ title: '10-19', field: '10-19', width: '80' }
]]
});
}<script type="text/javascript" src="/ajaxpro/prototype.ashx"></script>
<script type="text/javascript" src="/ajaxpro/core.ashx"></script>
<script type="text/javascript" src="/ajaxpro/converter.ashx"></script>
<script type="text/javascript" src="/ajaxpro/ajaxproArray,App_Web_4r0mjqju.ashx"></script>
//$("#tt")
//==>
jQuery("#tt")