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',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: '操作',  170, sortable:false, align: 'center', formatter:formatOper}]],
    ......

 三、最终效果,右冻结操作列

 create by lixiaojia   2020-09-09

原文地址:https://www.cnblogs.com/101key/p/13639343.html