Problem Formating With Hidden Column
Problem Formating With Hidden Column
FlyinFungi
Posts: 3Questions: 0Answers: 0
I am having some problems getting the correct format displayed when hiding column. If I hide any column it gives the weird format shown in the link. What would be a cause of this? I will post more information/code if needed.
http://imgur.com/a/HNpyg
Weird Format
[code]var oTable = $('.dataTable').dataTable({
"bJQueryUI": true,
//"bStateSave": true,
"sPaginationType": "full_numbers",
/* Sort by 3rd column first, and then 4th column */
"aaSorting": [[2,'desc'], [2,'desc']],
"aoColumns": [
{ "sClass": "center" },
null,
{ "sClass": "center" },
{ "sClass": "center" },
null,
{ "sClass": "center" },
{ "sClass": "center" },
{ "sClass": "center" },
{ "bVisible": false},
{ "bVisible": false},
{ "bVisible": false}
][/code]
Good Format
[code] var oTable = $('.dataTable').dataTable({
"bJQueryUI": true,
//"bStateSave": true,
"sPaginationType": "full_numbers",
/* Sort by 3rd column first, and then 4th column */
"aaSorting": [[2,'desc'], [2,'desc']],
"aoColumns": [
{ "sClass": "center" },
null,
{ "sClass": "center" },
{ "sClass": "center" },
null,
{ "sClass": "center" },
{ "sClass": "center" },
{ "sClass": "center" },
{ "bVisible": true},
{ "bVisible": true},
{ "bVisible": true}
][/code]
http://imgur.com/a/HNpyg
Weird Format
[code]var oTable = $('.dataTable').dataTable({
"bJQueryUI": true,
//"bStateSave": true,
"sPaginationType": "full_numbers",
/* Sort by 3rd column first, and then 4th column */
"aaSorting": [[2,'desc'], [2,'desc']],
"aoColumns": [
{ "sClass": "center" },
null,
{ "sClass": "center" },
{ "sClass": "center" },
null,
{ "sClass": "center" },
{ "sClass": "center" },
{ "sClass": "center" },
{ "bVisible": false},
{ "bVisible": false},
{ "bVisible": false}
][/code]
Good Format
[code] var oTable = $('.dataTable').dataTable({
"bJQueryUI": true,
//"bStateSave": true,
"sPaginationType": "full_numbers",
/* Sort by 3rd column first, and then 4th column */
"aaSorting": [[2,'desc'], [2,'desc']],
"aoColumns": [
{ "sClass": "center" },
null,
{ "sClass": "center" },
{ "sClass": "center" },
null,
{ "sClass": "center" },
{ "sClass": "center" },
{ "sClass": "center" },
{ "bVisible": true},
{ "bVisible": true},
{ "bVisible": true}
][/code]
This discussion has been closed.
Replies
oTable.css('width', '100%');
Allan