easyui datagrid 右凍結、右側凍結、凍結右邊列、凍結右側列


一、頁面加上以下樣式即可實現右凍結:

<style>
    .datagrid-view1 {
        left: auto;
        right: 0;
    }
    .datagrid-view2 {
        left: 0;
        right: auto;
    }
 </style>

二、checkbox及行號靠左顯示處理:

<table id="dg" cellspacing="0" cellpadding="0" style="display: none;">
       <thead>
            <tr>
                <th data-options="field:'ck',checkbox: true"></th>
                <th data-options="field:'rowNo',width:40,
                                    formatter:function(value,row,index){
                                                  return index + 1 + ( $('#dg').datagrid('options').pageNumber - 1 ) 
                                                                  * $('#dg').datagrid('options').pageSize;
                                            }">行號</th>
$('#dg').datagrid({
    rownumbers: false, //行號  
    frozenColumns: [[{ field: 'operate', title: '操作', width: 170, sortable:false, align: 'center', formatter:formatOper}]],
    ......

 三、最終效果,右凍結操作列

 

 create by lixiaojia   2020-09-09


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM