I am using DataTables along with responsive and facing issues while trying to display only certain columns.
Table layout is like this:
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!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…