easyui datagrid 注意事项

来源:互联网 发布:php framework框架 编辑:程序博客网 时间:2024/06/04 19:47

使用js指定表格属性时,表格html中的table就只需要一个ID,不能设置class,要不然在框架页中加载时会访问两次数据源

(document).ready(function () {(‘#tt’).datagrid({
url: ‘/operator/list’,
rownumbers: true,
idField: ‘id’,
striped: true,
singleSelect:true,
collapsible:true,
onSelect: function (rowIndex, rowData) {
setsel(‘tt’, ‘sel’, rowIndex, true);
}
});
});

<table id="tt"  >    <thead>        <tr>            <th data-options="field:'edit',width:50" align="center"></th>            <th data-options="field:'operator',width:80">登录名</th>            <th data-options="field:'rights'">权限</th>        </tr>    </thead></table>
0 0
原创粉丝点击