jQuery MiniUI

标题: datagrid动态设置列问题 [打印本页]

作者: Liuxl123    时间: 2016-3-3 11:50:04     标题: datagrid动态设置列问题

代码片段1:
<div id="datagrid1" class="mini-datagrid" style="width:700px;height:280px;"
        url="/TBPWeb/CbmAction.do?method=minitree"
        allowCellSelect="true"
    >


代码片段2:
       grid.set({
                columns: [
                    { type: "indexcolumn" },
                    { field: "hjwd", width: 120, headerAlign: "center", allowSort: true, header: "环境温度" },
                    { field: "hjsd", width: 100, headerAlign: "center", allowSort: true, header: "环境湿度" },
                ]
           });


执行grid.set...时,前台报一个  SCRIPT5007: 无法获取未定义或 null 引用的属性“type”  错误,我看实例中也没有用到属性列也没用type,版主帮忙看看啥情况

作者: dforce    时间: 2016-3-3 12:57:36

环境湿度后面多了个逗号




欢迎光临 jQuery MiniUI (http://miniui.com/discuss/) Powered by Discuz! X2