EasyUI多级表头设置
生活随笔
收集整理的這篇文章主要介紹了
EasyUI多级表头设置
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
EasyUI是一款比較容易上手的前端框架
下面說一下它的多級表頭設置:
//數據網$("#tt").datagrid({url:"${ctx}/UKeyManage/getUKeyManageData",pagination : true,//分頁pageSize : 20,//默認每頁條數rownumbers : true,//行數//nowrap : true,//設置為true,當數據長度超出列寬時將會自動截取pageList : [ 50, 40, 30, 20, 10 ],//可以選擇的分頁集合 striped : true, //設置表格奇偶行顏色是否不同columns:[[{field:'id',title:'id',align:'left',hidden:"true",'rowspan':2},//合并2行{field:'ukeyNo',title:'UKEY編碼',align:'left','rowspan':2},//合并2行{field:'ukeySerialNo',title:'UKEY序列號',align:'left','rowspan':2},//合并兩行{field:'memo',title:'備注',align:'left','rowspan':2},//合并兩行{title:'更新信息',align:'center','colspan':2},//合并兩列{field:'action',title:'操作',width:120,align:'center','rowspan':2, formatter:function(value,row,index){var a = '<input type="button" οnclick=deleteUKEY("'+row.id+'") value="刪除" /> ';return a;}} ],[{field:'updateTime',title:'更新時間',align:'center','rowspan':1},{field:'updateUser',title:'更新人',align:'left','rowspan':1} ]],toolbar:[{text:'新增',iconCls:'icon-add',handler:function(){editrow('','');}},'-',{text:'編輯',iconCls:'icon-edit',handler:function(){var row = $('#tt').datagrid('getSelected');editrow(row.ukeyNo,row.ukeySerialNo);}}],onDblClickRow:function(index,row){lastIndex = index;editrow(row.ukeyNo,row.ukeySerialNo);},});主要在于對表格的操作
效果圖如下:
總結
以上是生活随笔為你收集整理的EasyUI多级表头设置的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 文墨绘学怨气里长大的孩子
- 下一篇: 月月记账本技术支持