DataTablePlugin-jquery-column的大小调整是相对于其他列进行的。如何避免这种情况?
在data table plugin中,当我调整任意一个大尺寸(宽度)列的大小时,我希望保存列的宽度,并且仅当宽度大于某个值(我定义的该值)时才启用水平滚动 而现在它是相对调整其他列和固定在100% 有人能帮忙吗DataTablePlugin-jquery-column的大小调整是相对于其他列进行的。如何避免这种情况?,jquery,jquery-datatables,Jquery,Jquery Datatables,在data table plugin中,当我调整任意一个大尺寸(宽度)列的大小时,我希望保存列的宽度,并且仅当宽度大于某个值(我定义的该值)时才启用水平滚动 而现在它是相对调整其他列和固定在100% 有人能帮忙吗 // all task view table generation script var allTaskTable; allTaskTable = $('#AllTaskTable').dataTable({ "fnDrawCallback": function (AllTa
// all task view table generation script
var allTaskTable;
allTaskTable = $('#AllTaskTable').dataTable({
"fnDrawCallback": function (AllTaskSettings) {
if (AllTaskSettings.aiDisplay.length == 0) {
return;
}
}, "sPaginationType": "full_numbers",
"sDom": 'Rlr<"tableContainer"t>ip',
"aaSorting": [[9, "asc"]],//Default sorting is on column 9, desc
"aoColumnDefs": [
{ "bSortable": false, "aTargets": [0, 1] }//Do not sort on column 0 and 1, which are the radio button and context menu
],
"bRetrieve": true,
"bDestroy": true,
"bPaginate": true, // this line of code for header freeze
//"bFilter": true,
//"sScrollY": "580",
//"sScrollX": "100%",
//"sScrollXInner": "100%",
//"bScrollCollapse": true
"autoWidth": false
});
//所有任务视图表生成脚本
var-allTaskTable;
allTaskTable=$('#allTaskTable')。数据表({
“fnDrawCallback”:函数(AllTaskSettings){
if(AllTaskSettings.aiDisplay.length==0){
返回;
}
},“sPaginationType”:“完整编号”,
“sDom”:“Rlrip”,
“aaSorting”:[[9,“asc”]],//默认排序在第9列,desc
“aoColumnDefs”:[
{“bSortable”:false,“ataargets”:[0,1]}//不要对列0和1进行排序,这是单选按钮和上下文菜单
],
“bRetrieve”:没错,
是的,
“bPaginate”:true,//这行代码用于头冻结
//“bFilter”:没错,
//“sScrollY”:“580”,
//“sScrollX”:“100%”,
//“sScrollXInner”:“100%”,
//“崩溃”:真
“自动宽度”:false
});
链接:
希望这就是您想要的谢谢,但是scrollY将只启用水平滚动,实际上在我为我的表格应用了fixed:layout样式之后,它将启用水平滚动,而不会影响其他列宽。现在,我将尝试使用“bFilter”:true,“sScrollY”:“580”/“sScrollX”:“100%”,//“sScrollXInner”:“100%”,/“bScrollCollapse”:true“scrollY”:“200px”,“scrollCollapse”:true冻结标题,但在这里,当iam重新调整标题大小时,列与标题宽度不对齐,有一场比赛要错过吗?有什么解决方案吗?数据表非常敏感,需要仔细查看。样品小提琴是赞赏的
"scrollY": "200px",
"scrollCollapse": true,