微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

固定列的大小调整和重新排列

如何解决固定列的大小调整和重新排列

我有一个数据表,在单击行时有一个popOver,但是我的左右固定列并未相对于popOver see this imageLink for reference to popOver移动 。 我希望我的固定列与其他列对齐。请帮忙!!

//JS datatable 
  $('.tblTECards').DataTable({
                    ///  scrollY: 300,scrollX: true,colReorder: true,responsive:true,scrollCollapse: true,paging: false,"bSort": false,"bFilter": false,"info": false,//fixedColumns: true 

                    fixedColumns: {
                        leftColumns: 2,rightColumns: 2
                    }
                });
/////
//PopWindow Code  


        tableAllowace = "<table id='tblallowance' style='width: -webkit-fill-available;'><thead style='background-color:#f2f2f2; color:#7f7f7f;'><tr><th style='border-right:1px solid #cdd0d4;text-align:center;'>Allowance</th><th style='border-right:1px solid #cdd0d4;text-align:right;'>Quantity</th><th style='border-right:1px solid #cdd0d4;text-align:right;'>Rate</th><th style='border-right:1px solid #cdd0d4;text-align:right;'>Total</th><th style='text-align:center;'></th></tr></thead><tbody>" + allowanceRow + "</tbody></table>";
        $.fn.dataTable
            .tables({ visible: true,api: true })
            .columns.adjust()
            .fixedColumns().relayout();

        var divAllocations = '<div style="background-color:#eaeff5;" class="popover-content"><div style="text-align: end;margin-top: -5%;"><a href="javascript:void();" onclick="javascript:CloseAllowanceRow(this);"><i class="fal fa-window-close" style="font-size:larger; margin-top:3%;"></i></a></div><div><label style=" width: 120px;">Allowance(' + allocationCount + ') </label><label style="width:100px;"><a href="javascript:void(0);" onclick="javascript:AddAllowanceNewRow(' + allowancePunchID + ');"><i class="fa fa-plus-circle" style="color:#2a97ea;">&nbsp;&nbsp;Add</i></a></label><label id="lblAllocationMsg" style="width: 300px;"></label><input id="btnSaveAllowance" type="button" onclick="javascript:SaveTECardAllowance();" value="Save" style="font-size:smaller; background-color:#92d050; color:#f1f9e8; width:85px;height:24px;" class="btn btn-sm"></div><br />' + tableAllowace + '</div>'
        //   $(".DTFC_LeftBodyLiner").find(".tblTECards").find('tbody').find('tr').find('td:eq(1)')[1].innerHTML = '';
        newRows = newRows + divAllocations + "</td><td></td><td></td><td></td><td></td><td></td></tr>"
        $('#' + tableControlID + ' > tbody > tr:eq("' + (parseInt(index) + 1) + '")').after(newRows);

      

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。