Guest User

Untitled

a guest
Jun 19th, 2018
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. @{
  2. ViewBag.Title = "IndexExample";
  3. }
  4.  
  5. <script type="text/javascript">
  6. $(function () {
  7. $("#example").dataTable({
  8. "bServerSide": true,
  9. "bLengthChange": false, // don't show dropdown for #items per page
  10. "sAjaxSource": '@Url.Action("List")',
  11. "fnServerData": function (sSource, aoData, fnCallback) {
  12. $.ajax({
  13. dataType: 'json',
  14. type: "POST",
  15. url: sSource,
  16. data: aoData,
  17. success: fnCallback,
  18. error: function (jqXHR, textStatus, errorThrown) { alert('Error getting list of beers:' + errorThrown) }
  19. })
  20. },
  21. "bProcessing": false, // don't want to use the default progress indicator at this time
  22. "aoColumnDefs": [
  23. { "sName": "ID_CONFIG_VARIABLE", "aTargets": [0], "mDataProp": "ID_CONFIG_VARIABLE" },
  24. { "sName": "NOMBRE_VARIABLE", "aTargets": [1], "mDataProp": "NOMBRE_VARIABLE" }
  25. ]
  26. });
  27. });
  28. </script>
  29.  
  30. @*<script type="text/javascript">
  31. $(function () {
  32. $("#example").dataTable();
  33. });*@
  34.  
  35. <table id="example" cellpadding="0" cellspacing="0" border="0" class="display" width="100%">
  36. <thead>
  37. <tr>
  38. <th>ID_CONFIG_VARIABLE</th>
  39. <th>NOMBRE_VARIABLE</th>
  40. </tr>
  41. </thead>
  42. </table>
Add Comment
Please, Sign In to add comment