Denmark Puso

Denmark Puso

  • NA
  • 232
  • 48k

How to show all Lined-up in DataTable?

Aug 14 2019 1:09 AM
in our system all data are showed i need to filter the DataTable. and show all Lined-up only any suggest. Thanks in advance.
 
  1. <div class="ContainerBanner">  
  2. <h3 class="orders">Orders</h3>  
  3. <table id="OrderList" class="display table table-striped" style="width:100%">  
  4. <thead>  
  5. <tr>  
  6. <th>Agent</th>  
  7. <th>Client</th>  
  8. <th>Contact#</th>  
  9. <th>State</th>  
  10. <th>Address</th>  
  11. <th>Date Posted</th>  
  12. <th>Delivery Date</th>  
  13. <th>Quantity</th>  
  14. <th>Status</th>  
  15. <th>Date Delivered</th>  
  16. <th>Notes</th>  
  17. <th>Deleted</th>  
  18. <th></th>  
  19. </tr>  
  20. </thead>  
  21. <tbody></tbody>  
  22. </table>  
  23. <a href="@Url.Action("add","order")" class="btn btn-primary btn-sm"><i class="fas fa-cart-plus"></i> Order a Box</a>  
  24. </div>  
  25. <script type="text/javascript">  
  26. $(function () {  
  27. $('#OrderList').DataTable({  
  28. "ajax""@Url.Action("getorderlist", "order")",  
  29. "columns": [  
  30. "data""AgentName"},  
  31. "data""ClientFullName" },  
  32.   
  33. "data""PrimaryContact" },  
  34.   
  35. "data""State"},  
  36. "data""Address" },  
  37. "data""DatePosted" },  
  38. "data""DeliveryDate" },  
  39. "data""Quantity" },  
  40. "data""Status" },  
  41. "data""DateDelivered" },  
  42. "data""Notes" },  
  43. "data""IsDeleted"},  
  44. {  
  45. "render"function (data, type, full, meta) {  
  46. return "<button class='btn btn-primary btn-sm' onclick='edit(" + full.Id + ")'><i class='fas fa-user-edit'></i></button>"  
  47. }  
  48. }  
  49. ]  
  50. });  
  51. });  
  52. function edit(id) {  
  53. window.location.href = "@Url.Action("add", "order")?id=" + id;  
  54. }  
  55. </script>  

Answers (3)