我在我的项目中使用了Datatable。我在表格中显示了20-25列。在data table中是否有任何选项可以让用户自己隐藏不需要的列,而只显示他/她想要显示的列。
我的数据表:
$("#datatable-buttons").DataTable({
"destroy": true,
"order": [],
dom: "Bfrtip",
"bProcessing": false,
"bServerSide": false,
"searching": false,
"pageLength": 10,
"autoWidth": false,
"bAutoWidth": false, // Disable the auto width calculation
"sort": "position",
"stateSave": true,
"scrollX": true,
"ajax": "MyURL"
});发布于 2017-09-07 18:32:31
我认为你想在网页中加载数据后显示/隐藏列。请检查下面的链接,该链接演示了在datatable.Show / hide columns dynamically中加载数据后显示/隐藏列。可能会有帮助。
https://stackoverflow.com/questions/46093781
复制相似问题