HIDING COLUMNS
HIDING COLUMNS
hymanroth12
Posts: 5Questions: 0Answers: 0
(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