<div id="datagridTable" class="mini-datagrid" style="width:100%;min-height: 300px;" allowResize="true" idField="id" multiSelect="true" showEmptyText="true" emptyText="您好:系统暂无数据,请新增!"> <div property="columns"> <div type="indexcolumn" width="10" headerAlign="center">序号</div> <div field="name" width="120" headerAlign="center" allowSort="false">姓名</div> <div name="action" width="120" headerAlign="center" align="center" renderer="onActionRenderer" cellStyle="padding:0;">操作</div> </div> </div> var grid = mini.get("datagrid1"); var data = new Array(); data.push({"name":"张三"}); data.push({"name":"李四"}); grid.setData();
结束
完成静态设置,请注意不要使用load()方法
设置MiniUI Datagrid setData错误json error解决方法
原文地址:http://blog.51cto.com/zl0828/2116982