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( docs.dhtmlx.com/doku.php?id=dhtmlxgrid:sorting ):

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

And then called it like this:

       grid.setColSorting("int,istr");

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?

Thanks

sorting:
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:
docs.dhtmlx.com/doku.php?id=othe … leted_demo

filtering:
filtering in the dhtmlxgrid is case insensitive.
Please, have a look at the following example:
dhtmlx.com/docs/products/dht … 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.setColSorting("int,na");
    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.

    grid.setColSorting("int,istr,istr,istr,istr,istr,istr");

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 support.dhtmlx.com 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.