Can I mask the ordering « sign » in the columns header without changing the CSS ?
Can I mask the ordering « sign » in the columns header without changing the CSS ?
Link to test case: https://live.datatables.net/mepisike/4/edit?html,css,js,output
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
Hi,
In this example, I don't want the « ordering » chars to be visible in the header and disable the ordering for all columns.
https://live.datatables.net/mepisike/4/edit?html,css,js,output
new DataTable('#example', {
columnDefs: [
{ orderable: false, targets: '_all' }
],
// orderFixed: [[0, 'desc'], [1, 'desc']],
order: [[0, 'desc'], [1, 'desc']],
rowGroup: {
dataSrc: ['0'],
}
});
Can I mask the « triangles » without changing the CSS ?
It's really a newbie question... sorry
Thanks for your help
This question has an accepted answers - jump to answer
Answers
You just need
ordering
https://live.datatables.net/mepisike/6/edit?html,js,output
Disabling
ordering
will turn off all Datatables ordering of the table. The table will displayed in the order it was read in. This won't work with RowGroup. There aren't any built in options to hide the sorting icons. I think the only option is to apply CSS to override the Datatables settings, for example:Updated test case:
https://live.datatables.net/mepisike/7/edit
Kevin
Thanks Kevin.
I've tried before posting with
ordering: false
and like you said, it's not working when using RowGroup.