Problem Formating With Hidden Column

Problem Formating With Hidden Column

FlyinFungiFlyinFungi Posts: 3Questions: 0Answers: 0
edited February 2011 in General
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]

Replies

  • FlyinFungiFlyinFungi Posts: 3Questions: 0Answers: 0
    Bump for some help, I am still investigating a solution or workaround.
  • FlyinFungiFlyinFungi Posts: 3Questions: 0Answers: 0
    I found a solution. For some reason you need to set the CSS manually for the table.

    oTable.css('width', '100%');
  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    That's interesting - I'm not sure what would cause that off the top of my head. Good to see you've got a work around, but if you are able to post a link to a version which isn't working, that would help be debug what is going on.

    Allan
This discussion has been closed.