Sep 1, 2018
0
Level 1
Datatables static row at bottom
I have leaderboards with usernames and their points. There is pagination every 10users. First three users have custom classes so they are colored gold/silver and bronze. Now what I want to do is to have a static row at bottom for example and in that row currently logged in user would be shown, his place, username and points. Places are made with index column. So how should I approach this ?
I find user with (in drawCallback event) so that I could remember data, but this only works when I come to the page that he's at:
table.rows().eq( 0 ).each( function (idx) {
var row = table.row( idx );
if ( row.data().username === 'miko55' ) {
row.nodes().to$().addClass( 'table-success' );
alert(idx);
}
} );
Please or to participate in this conversation.