I am using DataTables along with responsive and facing issues while trying to display only certain columns.
I need to display to only 'Column 1', 'Column3', 'Column 7', 'Column 8', 'Column 10'
and hide others( these should be displayed by expand control at the end of each row ).
JS:
$( 'table' ).DataTable( {
order: [ [ 0, "asc" ] ],
responsive: {
details: {
type: 'column',
target: 'tr'
}
},
columnDefs: [ {
className: 'control',
orderable: false,
targets: -1
} ]
} );
This is the JSFiddle
. Any suggestions!