Case insensitive sort
Case insensitive sort
plw
Posts: 34Questions: 13Answers: 0
Is there a way of of doing a case insensitive sort please. There must be lots of people who need it so I can't believe it isn't possible
Answers
The default behaviour is case insensitive searches - for example, type "ashton" on the home page table. If you want to disable it, you can use
search.caseInsensitive
,Colin
I know and I wish it wasn't . I just have and it still hasn't made any difference (:
I am stuck
Do you actually want case sensitive?
"caseInsensitive": true doesn't change anything. It's the default.
I am trying to sort not search and nothing I have tried makes any Difference.
Ah sorry, I misread that to be "search", not "sort" - apologies. But that said, sorts also are case-insensitive - see here ("ashton cox"). You can use the case-sensitive sorting plugin if you don't want that behaviour.
Colin
I have just realised that sorted out my Sort Problem as well anyway so thanks for you suggestion. I thought you must have misread it as search but it worked - hurray
Correct - DataTables sorting is case-insensitive by default as shown in the source here.
There is an exception to that though - if you are using server-side processing, then it is up to the server what ordering is applied. Some databases will be case-sensitive by default.
Allan