eayUI datagrid 列合并、合并列

来源:互联网 发布:淘宝店铺运动服简介 编辑:程序博客网 时间:2024/05/18 00:10


<script type="text/javascript">//列合并function colspanBtn(){//参数配置var merges = {index: 0,            //第1行开始,field:"unitcost",   //从指定的列(unitcost)开始colspan:3             //从指定的列开始,合并多少个列}$("#table1").datagrid('mergeCells',{index: merges.index,field: merges.field,colspan: merges.colspan});}//footer 列合并function colspanBtn(){//参数配置var merges = {index: 0,        //第1行开始,field:"unitcost",//从指定的列(unitcost)开始colspan:3  //从指定的列开始,合并多少个列}$("#table1").datagrid('mergeCells',{index: merges.index,field: merges.field,colspan: merges.colspan,type: 'footer'//对footer列合并,如果不写,则为普通的列合并});}</script>

原创粉丝点击