jQuery MiniUI
标题:
DataGrid 数据无法显示
[打印本页]
作者:
lxy
时间:
2012-7-14 17:09:21
标题:
DataGrid 数据无法显示
刚刚接触miniUI,请问各位大侠. 我的datagrid 为什么不显示数据,但能显示 total.记录总数. 这是为什么?请帮忙看看,小第感激不尽.
1.Json 数据格式如下:
{"total":2,
"data":[{"EmpName":"管理员","Password":"1","IsEnable":true,"od":1,"ID":1,"DepartName":"资讯部","EmpNo":"a"},
{"EmpName":"测试员","Password":"1","IsEnable":true,"od":2,"ID":2,"DepartName":"生产部","EmpNo":"t"}]
}
2. Url:指定 grid.txt .只显示total. 也不显示data.
3. HTML如下:
<div id="datagrid1" class="mini-datagrid" style="width:100%;height:100%;" allowResize="true"
url="../data/AjaxService.aspx?method=LoadUser" multiSelect="true" idField="ID" >
<div property="columns">
<!--<div type="indexcolumn"></div> -->
<div type="checkcolumn" ></div>
<div field="ID" width="120" headerAlign="center" allowSort="true">ID</div>
<div field="EmpNo" width="120" headerAlign="center" allowSort="true">员工编号</div>
<div field="EmpName" width="120" headerAlign="center" allowSort="true">员工姓名</div>
<div field="DepartName" width="120" headerAlign="center" allowSort="true">部门名称</div>
<div field="Password" width="120" headerAlign="center" allowSort="true">密码</div>
<div field="IsEnable" width="120" headerAlign="center" allowSort="true">是否有效</div>
</div>
</div>
<script type="text/javascript">
mini.parse();
var grid = mini.get("datagrid1");
grid.load();
</script>
作者:
lxy
时间:
2012-7-14 22:38:11
问题解决了. 郁闷.原来并不是DataGrid不显示数据,而是被分页挡住了,拖拽拉动表格,就看到了.
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/)
Powered by Discuz! X2