Strange behaviour with hidden columns
Strange behaviour with hidden columns
I've got a weird problem with hidden columns within a table.
For exactly the same html page, if I load the page with a url such as:
http://localhost/page/a/
then the page loads just fine and the columns hide perfectly.
However, if I change the URL to:
http://localhost/page/1/
(using a "1" instead of an "a" in the path, or to a URL with any number in the path, then the hidden columns fail to hide correctly.
I'm using the following code to initialise the table.
$('#contacts-table').dataTable( {
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"bStateSave": true,
"bProcessing": true,
"bServerSide": true,
"aaSorting": [[ 1, "desc" ]],
"aoColumnDefs": [
{ "bSortable": false, "aTargets": [ ] },
{ "bSearchable": false, "aTargets": [ 1, 2 ] },
{ "sClass": "center", "aTargets": [ 1 ] },
{ "bVisible": false, "aTargets": [ 3, 4 ] }
],
"sAjaxSource": "/loadtabledata/1/"
} ).fnSetFilteringDelay(500);
I am pulling hair out trying to work out why just changing the URL should be doing this.
Any one any ideas?
For exactly the same html page, if I load the page with a url such as:
http://localhost/page/a/
then the page loads just fine and the columns hide perfectly.
However, if I change the URL to:
http://localhost/page/1/
(using a "1" instead of an "a" in the path, or to a URL with any number in the path, then the hidden columns fail to hide correctly.
I'm using the following code to initialise the table.
$('#contacts-table').dataTable( {
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"bStateSave": true,
"bProcessing": true,
"bServerSide": true,
"aaSorting": [[ 1, "desc" ]],
"aoColumnDefs": [
{ "bSortable": false, "aTargets": [ ] },
{ "bSearchable": false, "aTargets": [ 1, 2 ] },
{ "sClass": "center", "aTargets": [ 1 ] },
{ "bVisible": false, "aTargets": [ 3, 4 ] }
],
"sAjaxSource": "/loadtabledata/1/"
} ).fnSetFilteringDelay(500);
I am pulling hair out trying to work out why just changing the URL should be doing this.
Any one any ideas?
This discussion has been closed.
Replies
Allan