Edit values and styles for the entire column
Edit values and styles for the entire column
fernandogferreira
Posts: 7Questions: 0Answers: 0
Hi,
I am using dataTables for display contents.
Everything works fine (great plug-in)
The only problem is: My site has an authefication system... If the user is logged in one column should change the value of all its rows...
I kind solved the problem using
[code]$("#col-id",document).each{ function(){
$(this).hmtl('New content');
$(this).css('background', 'transparent');
});
Sure this work only for the first page... Due the pagination, I can't change the entire table...
How can I do this
Thxs
}
I am using dataTables for display contents.
Everything works fine (great plug-in)
The only problem is: My site has an authefication system... If the user is logged in one column should change the value of all its rows...
I kind solved the problem using
[code]$("#col-id",document).each{ function(){
$(this).hmtl('New content');
$(this).css('background', 'transparent');
});
Sure this work only for the first page... Due the pagination, I can't change the entire table...
How can I do this
Thxs
}
This discussion has been closed.
Replies
You'll need to link your function to the redraw event, so each time after the table redraws it then run your function to change the formatting before display to the user.
[code]
$(document).ready( function() {
$('#example').dataTable( {
"fnDrawCallback": function() {
$("#col-id",document).each{ function(){
$(this).hmtl('New content');
$(this).css('background', 'transparent');
});;
}
} );
} )
[/code]
Patrick