HIDING COLUMNS
HIDING COLUMNS
![hymanroth12](https://secure.gravatar.com/avatar/2b71636847c7727517bae5bed95a0e39/?default=https%3A%2F%2Fvanillicon.com%2F2b71636847c7727517bae5bed95a0e39_200.png&rating=g&size=120)
(a) I have 15 columns of data
(b) I want to hide 3 specific columns. ( NOTE: I already have the 3 columns showing up at my SHOW/HIDE ) this is AWESOME !
sOut += 'Composers:'+aData[12]+' ';
sOut += 'Publisher :'+aData[13]+' ';
sOut += 'Description :'+aData[14]+' ';
NOW, LET'S HIDE THE # COLUMNS - I have tried several combinations of aoColumnDefs, BEFORE or AFTER "sPaginationType": "full_numbers", but my page goes blank: (obviously, I don't fully comprehend aoColumnDefs capabilities)
"aoColumnDefs": [
{ "bVisible": false, "aTargets": [ 0 ] }
HOW DO I USE THE ABOVE to target (3) specific columns, without my page going blank?
/********** THIS IS MY CURRENT CODE WHICH IS WORKING SUPERBLY, EXCEPT FOR HIDING 3 COLUMNS /*********************
/* * Initialse DataTables, with no sorting on the 'details' column */
var oTable = $('#example').dataTable(
{
"sPaginationType": "full_numbers",
"aoColumnDefs": [
{ "bSortable": false, "aTargets": [ 0 ] }
],
"aaSorting": [[1, 'asc']]
});
Thank you in advance for any suggestions !
(b) I want to hide 3 specific columns. ( NOTE: I already have the 3 columns showing up at my SHOW/HIDE ) this is AWESOME !
sOut += 'Composers:'+aData[12]+' ';
sOut += 'Publisher :'+aData[13]+' ';
sOut += 'Description :'+aData[14]+' ';
NOW, LET'S HIDE THE # COLUMNS - I have tried several combinations of aoColumnDefs, BEFORE or AFTER "sPaginationType": "full_numbers", but my page goes blank: (obviously, I don't fully comprehend aoColumnDefs capabilities)
"aoColumnDefs": [
{ "bVisible": false, "aTargets": [ 0 ] }
HOW DO I USE THE ABOVE to target (3) specific columns, without my page going blank?
/********** THIS IS MY CURRENT CODE WHICH IS WORKING SUPERBLY, EXCEPT FOR HIDING 3 COLUMNS /*********************
/* * Initialse DataTables, with no sorting on the 'details' column */
var oTable = $('#example').dataTable(
{
"sPaginationType": "full_numbers",
"aoColumnDefs": [
{ "bSortable": false, "aTargets": [ 0 ] }
],
"aaSorting": [[1, 'asc']]
});
Thank you in advance for any suggestions !
This discussion has been closed.
Replies
{ "bSearchable": false, "bVisible": false, "aTargets": [ 12 ] },
{ "bSearchable": false, "bVisible": false, "aTargets": [ 13 ] },
{ "bSearchable": false, "bVisible": false, "aTargets": [ 14 ] },
{ "bSearchable": false, "bVisible": false, "aTargets": [ 12, 13, 14 ] }
[/code]
will work as well
Allan