Hello,
I have a custom float field which contains currency format (eg. as a string '123 921.43 USD'). As it's a number not a string, I want to use custom dataType which is in this example:
colModel[0].dataType = function (val1,val2) {
val1 = val1.replace(/ /g, '');
val1 = val1.replace('USD', '');
val2 = val2.replace(/ /g, '');
val2 = val2.replace('USD', '');
val1 = parseFloat(val1);
val2 = parseFloat(val2);
if (val1 > val2) return 1;
if (val1 < val2) return -1;
return 0;
};
And it sorts column fine. But filter treats the column as a string and won't filter it well as a float or using custom coparator as seen above. Is there any chance to take column dataType as a comparator method not as a string in filter? Notice I don't want to make this column "float" first and use column render method later.
Thanks in advance