jquery - How to implement pagination to my table? -


i have table i'd able search through using pages. assume have use jquery this. can help/forward me useful tutorials can use. i'm using c# , mvc potentially use well.

html:

<div class="table-responsive">     <table class="table">         <thead>             <tr>                 <th>                     type                 </th>                 <th>                     claim pack attached                 </th>                 <th>                     review period name                 </th>                 <th>                     claim no                 </th>                 <th>                     line                 </th>                 <th>                     account no                 </th>                 <th>                     supplier                 </th>                 <th>                     amount                 </th>                 @if (model.reportdata.select(r => r.clientid).firstordefault() == 1) {                     <th>asda status</th>                 }                 <th>                     date sent                 </th>                 <th>                     days os                 </th>                 @if (model.reportdata.select(r => r.clientid).firstordefault() == 1) {                     <th>                         nominal period                     </th>                 }                 else {                     <th>                         sl invoice no                     </th>                 }                 <th>                     area                 </th>                 @if (model.reportdata.select(r => r.clientid).firstordefault() == 1) {                     <th>                         debit ref                     </th>                     <th>                         debit date                     </th>                 }                 <th>                     deduct date                 </th>                 <th>                     agrred                 </th>                 <th>                     apl reason                 </th>                 @if (model.reportdata.select(r => r.clientid).firstordefault() == 1) {                     <th>                         dept no                     </th>                     <th>                         department name                     </th>                 }             </tr>         </thead>         @foreach (var in model.reportdata) {             <tbody>                 <tr>                     <td>@i.typeid</td>                     @if (@i.cpattached != null) {                         <td style="text-align:center">                             <a title="view claim pack" href="@url.action("downloadfile", "reports", new { i.clientid, i.cpattached })">                                 <span class="glyphicon glyphicon-file" />                             </a>                         </td>                     }                     else {                         <td> </td>                     }                     <td>@i.reviewperiodname</td>                     <td>@i.claimid</td>                     <td>@i.line</td>                     <td>@i.accountno</td>                     <td>@i.suppliername</td>                     <td>@string.format("{0:c0}", i.amount)</td>                     @if (i.clientid == 1) {                         <td>@i.statuscategorydesc</td>                     }                      @if (@i.datesent == null) {                         <td>  </td>                     }                     else {                         <td>@i.datesent.value.toshortdatestring()</td>                     }                     <td>@i.dayos</td>                     @if (i.clientid == 1) {                         <td>@i.nominalperiod</td>                     }                     else {                         <td>@i.slinvoiceno</td>                     }                     <td>@i.area</td>                     @if (i.clientid == 1) {                         <td>@i.debitref</td>                         if (@i.debitdate == null) {                             <td>  </td>                         }                         else {                             <td>@i.debitdate.value.toshortdatestring()</td>                         }                     }                     @if (@i.deductdate == null) {                         <td>  </td>                     }                     else {                         <td>@i.deductdate.value.toshortdatestring()</td>                     }                      <td>@i.agreed</td>                     <td>@i.aplreason</td>                     @if (i.clientid == 1) {                         <td>@i.deptno</td>                         <td>@i.deptname</td>                     }                   </tr>             </tbody>         }     </table> </div> 

i used google:

http://www.asp.net/mvc/overview/getting-started/getting-started-with-ef-using-mvc/sorting-filtering-and-paging-with-the-entity-framework-in-an-asp-net-mvc-application

http://devproconnections.com/aspnet-mvc/aspnet-mvc-paging-done-perfectly

http://www.codeguru.com/csharp/.net/net_asp/mvc/implementing-sorting-and-paging-in-asp.net-mvc.html

these first 3 hits clicked on google try.


Comments