now,you should find the parameter in the datatable document. the specified parameter usual have .

解决方案 »

  1.   

     Using the aaSorting initialisation parameter, you can get the table exactly how you want to present the information. The aaSorting parameter is an array of arrays where the first value is the column to sort on, and the second is 'asc' or 'desc' as required (it is a double array for multi-column sorting). $(document).ready(function() {
    $('#example').dataTable( {
    "aaSorting": [[ your column number, "desc" ]]
    } );
    } );
      

  2.   

    Sorry, it doesn't work. When I set "bServerSide": true, it will do all the sorting on the server side. But I just want to it to do somework on client side when I have already got the data from server side, what should I do?
      

  3.   

    Since I cann't find, I ask the question here.
      

  4.   

    呃 can you speak chinese!!!      $(document).ready(function(){
    setTbody();
    var Pageheight = document.documentElement.clientHeight;//页面的高度
            var height = Pageheight-135;//135=数据操作区域的高度+thead的高度+分页区域的高度 (这三部分的高度都是不变的)
    var oTable = $('#example').dataTable({       
       "bStateSave": false, //保存状态到cookie ******很重要 , 当搜索的时候页面一刷新会导致搜索的消失。使用这个属性设置为true就可避免了    
       "bPaginate": true,// 是否使用分页
       "bProcessing": true, //是否显示正在处理的提示 
       "bLengthChange": false,//是否启用设置每页显示记录数                  
       "iDisplayLength":100,//默认每页显示的记录数
       "bFilter": true, //是否使用搜索   
       "bJQueryUI": true, //页面风格使用jQuery.
      // "sScrollY": 200,//竖向滚动条 tbody区域的高度
       "sScrollX": "100%",//横向滚动条   
       "sScrollXInner": "100%",
       "bScrollCollapse": true,        
       "oLanguage": {//语言国际化
                                 "sUrl": "<%=path %>/css/datatables/dt.txt"
                              },    
       "sPaginationType": "full_numbers",//分页样式
       "bAutoWidth":true, //列的宽度会根据table的宽度自适应
       "bSort": true,//是否使用排序
       "aaSorting": [[ 0, "desc" ]],//默认按 第一列desc排序 这里以数组的形式表示 所以是序列是0                                     
    });
      

  5.   

    推荐这个博客看看。
    Jquery DataTable基于Twitter Bootstrap的样式配置和demo下载 
    http://www.suchso.com/UIweb/jquery-datatable-Twitter-Bootstrap-css-js-demo-down.html