我的应用程序使用jquery数据表1.10。我的数据表定义如下:
$("#info_table", node).DataTable(
{
"dom" : 'Rflrtip',
"rtl" : true,
"paging" : true,
"pagingType": "full_numbers",
"ordering" : true,
"searching" : true,
"columns" : aoColumns,
"fnCreatedRow" : function(nRow, aData,
iDataIndex) {
$(nRow).attr('id', aData.ID);
},
"language": {
"emptyTable": "No records to display"
}
});
问题是我需要更改表和光标进行排序。下面的CSS允许我更改光标。
#info_table th.sorting, #info_table th.sorting_asc, #info_table th.sorting_desc{
cursor: pointer !important;
}
但当我更改光标时,它不允许我重新调整列的大小。在我的应用程序中,提供列大小调整选项是必要的。有人能帮我找到在做出客户更改时重新调整列大小的方法吗。
是的,您需要为数据表使用调整大小列插件。
<script src='http://www.bacubacu.com/colresizable/js/colResizable-1.5.source.js'></script>
$('#info_table').DataTable({
customProp: 'Hello World',
initComplete: function(settings) {
$('#example').colResizable({liveDrag:true});
}
});