Advertisement
Guest User

Untitled

a guest
Apr 15th, 2014
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. $(document).ready(function () {
  2. var oTable = $('#data').dataTable({
  3. "bJQueryUI": true,
  4. "bProcessing": true,
  5. "bServerSide": true,
  6. "bSort": false,
  7. "sAjaxSource": "query.php",
  8. "sPaginationType": "full_numbers",
  9. "aoColumns": [
  10. null,
  11. null,
  12. null,
  13. ],
  14. "fnRowCallback": function (nRow, aData, iDisplayIndex) {
  15. $(nRow).attr("id", aData[4]);
  16. return nRow;
  17. },
  18. "fnDrawCallback": function( oSettings ) {
  19. // How do I call fnRowCallback here?
  20. // losing post processing because it is not being called after a redraw
  21. }
  22. });
  23.  
  24. <tr>
  25. <td>a</td>
  26. <td class="boldmetight">b</td>
  27. </tr>
  28. <tr>
  29. <td class="boldmetight">c</td>
  30. <td>d</td>
  31. </tr>.. etc
  32.  
  33. var otable = $("#datatable").dataTable({
  34. "fnRowCallback": function(nRow, aData, iDisplayIndex) {
  35. $('.boldmetight', nRow).html('<b>' + $('.boldmetight', nRow).text() + '</b>');
  36. }
  37. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement