Table header misaligned // fnAdjustColumnSizing
Table header misaligned // fnAdjustColumnSizing
presage
Posts: 8Questions: 0Answers: 0
Hi, my table header was misaligned with my datas since i added a scroller so i search on the forum how to solve this and fnAdjustColumnSizing works well.
I have a class css hide, without it, if i display my table at start, all works fine.
But i use a button to display my table and need fnAdjustColumnSizing.
My problem is, it works...but it's ugly because we have time to see the table resizing. How can i fix it?
My button: Rechercher
My css:
.hide
{
display: none;
}
My javascript(in document.ready):
var oMsgofTable = $('#table_msgof').dataTable({
"sScrollY": "150px",
"sAjaxSource": "/ajax/get-msgof-list/",
"bServerSide": true,
"sDom": "frtiS",
/*"oScroller": {
"loadingIndicator": true // facultatif
}*/
});
$('#but').live('click',function(){
oMsgofTable.fnAdjustColumnSizing(); //Corrige le probleme d'alignement du header
$("#msgof_form_outer").toggleClass("hide");
});
Thanks for your time :) //Hope you understand my english =p
I have a class css hide, without it, if i display my table at start, all works fine.
But i use a button to display my table and need fnAdjustColumnSizing.
My problem is, it works...but it's ugly because we have time to see the table resizing. How can i fix it?
My button: Rechercher
My css:
.hide
{
display: none;
}
My javascript(in document.ready):
var oMsgofTable = $('#table_msgof').dataTable({
"sScrollY": "150px",
"sAjaxSource": "/ajax/get-msgof-list/",
"bServerSide": true,
"sDom": "frtiS",
/*"oScroller": {
"loadingIndicator": true // facultatif
}*/
});
$('#but').live('click',function(){
oMsgofTable.fnAdjustColumnSizing(); //Corrige le probleme d'alignement du header
$("#msgof_form_outer").toggleClass("hide");
});
Thanks for your time :) //Hope you understand my english =p
This discussion has been closed.
Replies
Please post a link to a test case in future.
For this you could make the element `display:block` but `visibility:hidden` while the redraw is done before finally making it visible.
Thanks