简体   繁体   English

我如何排序我的数据表列以升序显示

[英]How do i order my datatable column to display in ascending order

I have this section of code already in place and i think it uses the domsourced method to render the control with the class .file-upload table as a datatable. 我已经准备好了这部分代码,并且我认为它使用domsourced方法使用类.file-upload table作为数据.file-upload table来呈现控件。

initDataTable = function () {
        services.dataTables.domSourced('.file-upload table');
      };

now i want to use this code below to order the first column in desc order, how do i do that 现在我想使用下面的代码按降序排列第一列,我该怎么做

"order": [[0, 'asc']],

Did you tried this? 你有试过吗

$(document).ready(function() {
    $('#example').DataTable( {
        "order": [[ 0, "desc" ]]
    } );
} );

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 数据表升序无法正常工作 - DataTable Ascending order Not Working Properly 请如何按时间升序排序时间范围? - Please How do I sort range of time in ascending order? 如何以一个参数升序调用方法? - How do I call method based on one parameter in ascending order? 如何按年龄升序对这些人的数据进行排序 - How do I sort this data of people in ascending order of their age 如何修复我的代码以显示一个表格? - how do I fix my code in order to display one table? 如何更改排序 function 以同时接受升序和降序 - How can i change my sort function to both accept ascending order and descending order 如何使我的动态JSP表可按升序和降序滚动和排序? - How can I make my dynamic JSP table scrollable and sortable in ascending and descending order? 我如何编写一个 for 循环来递减迭代器,同时按升序输出数字 - How do I write a for loop that decrements the iterator while outputting numbers in ascending order 如何从 JSON 和 output 将数据按升序排序到表中? - How do I sort the data in ascending order from a JSON and output it to table? 我有一个降序排列的行图。 我想将顺序更改为升序。 这是我的代码: - I have a row chart ordered in descending order. I want to change the order to ascending. This is my code:
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM