您的位置:首页 > 产品设计 > UI/UE

easyui datagrid 注意事项

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

(document).ready(function () {(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>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: