DataTables

DataTables – post row-rendering;

$(document).ready(function() {
$(‘#example’).dataTable( {
“fnRowCallback”: function( nRow, aData, iDisplayIndex ) {
/* Bold the grade for all ‘A’ grade browsers */
if ( aData[4] == “A” )
{
$(‘td:eq(4)’, nRow).html( ‘<b>A</b>’ );
}
return nRow;
}
} );
} );

More bed-time reading – http://www.datatables.net/usage/callbacks

http://datatables.net/forums/comments.php?DiscussionID=1478&page=1#Comment_7568 looks to be of some use as well for multiple search fields (eg. text field and dropdown box and this and that, etc).

http://datatables.net/examples/server_side/select_rows.html is something also to implement for keeping track of which rows were selected\

http://datatables.net/examples/basic_init/table_sorting.html initial column sorting

$("#example").dataTable({
  "aaSorting": [[ 2, "asc" ]]
 });
CategoriesUI

Leave a Reply