Hidden columns shown during the loading
Hidden columns shown during the loading
simonpietro
Posts: 1Questions: 0Answers: 0
Hi,
I am using datatables with hidden columns inside, and it works fine. I am populating the table through php code. The problem is that when I load the page, for a couple of seconds (the time to load the data), the table is shown with the hidden column and without the proper css.
Below there is my datatable code:
[code]
var myTable = $('#my_table').dataTable({
"bPaginate": false,
"bJQueryUI": true,
"bInfo": false,
"bFilter": false,
"bAutoWidth": false,
"aoColumns":
[
{ "bVisible": false},
null,
null,
null,
null,
null,
{ "bSortable": false },
null,
null,
{ "bSortable": false }
],
"aaSorting":
[
[0,'desc'],[4, 'asc'],[5, 'desc']
],
"fnRowCallback": function( nRow, aData, iDisplayIndex )
{
var tds = $(nRow).children();
$(tds[0]).removeClass();
$(tds[0]).addClass("l pad_left5 pointer size25 c"); // name
return nRow;
}
}); // dataTable
[/code]
Thank you very much
I am using datatables with hidden columns inside, and it works fine. I am populating the table through php code. The problem is that when I load the page, for a couple of seconds (the time to load the data), the table is shown with the hidden column and without the proper css.
Below there is my datatable code:
[code]
var myTable = $('#my_table').dataTable({
"bPaginate": false,
"bJQueryUI": true,
"bInfo": false,
"bFilter": false,
"bAutoWidth": false,
"aoColumns":
[
{ "bVisible": false},
null,
null,
null,
null,
null,
{ "bSortable": false },
null,
null,
{ "bSortable": false }
],
"aaSorting":
[
[0,'desc'],[4, 'asc'],[5, 'desc']
],
"fnRowCallback": function( nRow, aData, iDisplayIndex )
{
var tds = $(nRow).children();
$(tds[0]).removeClass();
$(tds[0]).addClass("l pad_left5 pointer size25 c"); // name
return nRow;
}
}); // dataTable
[/code]
Thank you very much
This discussion has been closed.
Replies
You could consider using Ajax sourced data which of course doesn't have this issue.
Allan