bServerSide seems to break column auto width
bServerSide seems to break column auto width
richardhensman
Posts: 1Questions: 0Answers: 0
Hi
I have a datatable in my application that displays a large volume of data. I have setup the datatable to process serverside that works great. The only problem is that column autowidth no longer seems to work. Has anyone else experienced this?
jQuery(document).ready(function() {
jQuery("#joblist").dataTable({
"bAutoWidth": true,
"sPaginationType": "four_button",
"oLanguage": {
"sInfoFiltered": ""
},
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "/jobjson.html",
"aaSorting": [[ 2, "asc" ]],
"fnDrawCallback": function(){
jQuery('td').bind('mouseenter', function(){
jQuery(this).parent().find("a").addClass('hover');
});
jQuery('td').bind('mouseleave', function(){
jQuery(this).parent().find("a").removeClass('hover');
});
jQuery('td').bind('click', function(){
var link = jQuery(this).parent().find("a").first();
window.location.href = link.attr("href");
});
jQuery('th').bind('mouseenter', function(){
jQuery(this).addClass('highlight');
});
jQuery('th').bind('mouseleave', function(){
jQuery(this).removeClass('highlight');
});
}
});
} );
I have a datatable in my application that displays a large volume of data. I have setup the datatable to process serverside that works great. The only problem is that column autowidth no longer seems to work. Has anyone else experienced this?
jQuery(document).ready(function() {
jQuery("#joblist").dataTable({
"bAutoWidth": true,
"sPaginationType": "four_button",
"oLanguage": {
"sInfoFiltered": ""
},
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "/jobjson.html",
"aaSorting": [[ 2, "asc" ]],
"fnDrawCallback": function(){
jQuery('td').bind('mouseenter', function(){
jQuery(this).parent().find("a").addClass('hover');
});
jQuery('td').bind('mouseleave', function(){
jQuery(this).parent().find("a").removeClass('hover');
});
jQuery('td').bind('click', function(){
var link = jQuery(this).parent().find("a").first();
window.location.href = link.attr("href");
});
jQuery('th').bind('mouseenter', function(){
jQuery(this).addClass('highlight');
});
jQuery('th').bind('mouseleave', function(){
jQuery(this).removeClass('highlight');
});
}
});
} );
This discussion has been closed.