I am using igGridSorting with one column that has a compareFunc defined. When I use igGroupBy to group by a different column, and then sort by the column that has a compareFunc, the grouping gets all messed up. I investigated the problem and found that it is caused by the igGroupBy column uses the compareFunc of the sorted column when comparing. Further investigation found that it is because the compareFunc used when sorting is not initialized properly when there is no compareFunc defined for the column.
I changed infragistics.datasource.js line 2697 to the following so that the proper compareFunc will be used:
if ( (f.compareFunc === undefined) || (f.compareFunc === null) ) { compareValFunc = self._compareValues; } else if ($.type(f.compareFunc) === "function") {
Hello rsimm,
The described behavior may or not be a development issue, however I need a sample that reproduces it. Please send me such one, so that I can test this behavior on my side.
Regards,Tsanna
Thank you for the reply.
There is no doubt that it is a development issue. If you pass it along to the development team, then they will see where they initialize the compareValFunc variable before going into a loop...that changes compareValFunc based on the options of the column. The bug is that it does not reset compareValFunc to the default value if the columns' option for compareFunc is null or undefined, thus it uses the previously set compareValFunc (which in this case was set from the previous columns compareFunc option).
Unfortunately I don't have time right now to work up a sample app, but it should be pretty easy.