日期:2014-05-17  浏览次数:20425 次

dwz 表头排序
dwz 如何使用 表头排序,给个详细例子 带截图的 我用的是asp.net 

------解决方案--------------------

asp.net 点击表头排序及分页代码 


 
aspx:
 
<script type="text/javascript" src="jquery-1.2.6.js"></script>
           <script language="javascript" type="text/javascript">   
   var getPageData=function(i,pageCount)
   {
      $.ajax({
          url:'....aspx?'+new Date()+'&page='+i+'&url='+document.getElementById('ctl00_ContentArea_hidUrl').value+'&pageCount='+pageCount+'&Type='+document.getElementById('ctl00_ContentArea_hidType').value,
          type:'get',
          success:function(data,textStatus)
          {
              // $('#ShowData').text(data);
              // $('#ShowData')[0].innerHTML="";
              //$('#ShowData').innerHTML=data;
              document.getElementById('ShowData').innerHTML=data;
          },
          error:function(XMLHttpRequest,textStatus)
          {
             //debugger;
               $('#ShowData').text(XMLHttpRequest.responseText);
          },
          complete:function(XMLHttpRequest,textStatus)
          {
          
          }
         });
   }
   var sortDataGridView=function(sortExpression,sortDirection)
    {
      //event.returnVaule=false;
      $.ajax({
          url:'.....aspx?'+new Date()+'&sortEx='+sortExpression+'&url='+document.getElementById('ctl00_ContentArea_hidUrl').value+'&Type='+document.getElementById('ctl00_ContentArea_hidType').value,
          type:'get',
          success:function(data,textStatus)
          {
           document.getElementById('ShowData').innerHTML=data;
            //$('#ShowData').innerHTML = data;
          },
          error:function(XMLHttpRequest,textStatus)
          {
        &nb