Filter AND column sorting string case INsensitive for Pro v?

How can I make both the filtering and sorting of str columns case insensitive with the pro version?

I used the function( ):

       function istr(a,b,order){ 
            return (a.toLowerCase()>b.toLowerCase()?1:-1)*(order=="asc"?1:-1);

And then called it like this:


This doesn’t work, what am I missing? Will this make the filtering of the same column case insensitive?
If not what do I need to do?


Unfortunately the issue cannot be reproduced locally.
The function works well for us.
If issue still occurs for you - pleases, provide with a complete demo, where the issue can be reconstructed.
Here you can find a tutorial: … leted_demo

filtering in the dhtmlxgrid is case insensitive.
Please, have a look at the following example: … ilter.html

I don’t think a full working demo is required.

Playing with the code, if I call it this way it works fine:

    grid.setCustomSorting(istr, 1);

Problem is the grids can contain a dozen or more str columns I want to sort case insensitive.
Do I have to call it like this for multiple columns?

    grid.setCustomSorting(istr, 1);
    grid.setCustomSorting(istr, 2);
    grid.setCustomSorting(istr, 3);
    grid.setCustomSorting(istr, 4);
    grid.setCustomSorting(istr, 5);

This why I thought there was a more concise way to set multiple column sorting.
But when I do not use the setCustomSorting and just try to call with setColSorting the header is clickable and has sorting arrows, but nothing happens.


So is there a way to set setCustomSorting for multiple columns without calling the function repeatedly?

Thanks for you help.

How would I set the custom sort function in XML data/config??

I apologize.

For now: please, try to rename your custom sorting. at least 5 chars should be.
For example:

function istr_(a,b,order){ return (a.toLowerCase()>b.toLowerCase()?1:-1)*(order=="asc"?1:-1); }
Such situation will be fixed. You may open ticket at so we’ll provide you a fixed version of dhtmlxgrid.js that allows to use short names of the sorting function.

What about xml.
everything is the same:

mygrid = new dhtmlXGridObject('gridbox'); function istr_(a,b,order){ return (a.toLowerCase()>b.toLowerCase()?1:-1)*(order=="asc"?1:-1); } mygrid.loadXML("../common/grid.xml"); ... <column width="100" type="ed" align="left" sort="istr_">Title</column>

Oh sweet - I will try this right now!

Thanks for the swift reply!

Five character function name worked great!
I renamed the case insensitive str sorting function to ‘cistr’ and it works fine now!

Thanks again.