Author Topic: Filtering and Sortable the column index based on not case sensitive  (Read 3771 times)

bsolteam

  • Pro Deluxe
  • Full Member
  • *
  • Posts: 107
    • View Profile
Hi Team,
                We have requirement for the column index which contain filter text box and sortable the data.
   For  sortable the column index with not case sensitive , we achieved by giving the data type of column index as "stringi"

   Now along with this sortable we also need the filtering for the column index based on incase sensitive , for this we are trying we all other option, but did not got any solution.

So we are requesting the help from your side.
Please give solution ASAP.


Thanks in Advance
Bsol Team,

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Filtering and Sortable the column index based on not case sensitive
« Reply #1 on: December 18, 2015, 09:08:54 pm »
Please check the demos, the filtering is always case insensitive.

I understand filtering works incorrectly when dataType = 'stringi' which is an issue and would be corrected in next version.

As I workaround I suggest you to do case insensitive sorting with help of custom sorting instead of "stringi".

Code: [Select]
sortType: function (rowData1, rowData2, dataIndx) {
            var val1 = rowData1[dataIndx];
            var val2 = rowData2[dataIndx];

            val1 = val1 ? val1.toUpperCase() : "";
            val2 = val2 ? val2.toUpperCase() : "";
            var ret = 0;
            if (val1 > val2) {
                ret = 1;
            } else if (val1 < val2) {
                ret = -1;
            }
            return ret;
}

« Last Edit: December 18, 2015, 09:37:05 pm by paramquery »

ralph1996

  • Pro Ultimate
  • Jr. Member
  • *
  • Posts: 80
    • View Profile
Re: Filtering and Sortable the column index based on not case sensitive
« Reply #2 on: December 23, 2016, 09:07:06 pm »
I am seeing this same behavior with stringi in version 3.3.  I am not sure what version this was posted for, but has this been fixed?  The post os almost a year old so not sure if a new version is out wiht this fix or not.

If not is there a patch we can apply as opposed to having to add a custom sort to every column?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Filtering and Sortable the column index based on not case sensitive
« Reply #3 on: December 23, 2016, 10:47:19 pm »
sortModel.ignoreCase: true can be used instead of dataType: stringi.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Filtering and Sortable the column index based on not case sensitive
« Reply #4 on: January 11, 2017, 08:38:32 pm »
Filtering issue with dataType: 'stringi' has been corrected in 3.3.5