Hello,
I thought also that index property might help but it didn't. Seems like problem (at least for sorting) is in fact that when function is used for column name column id is set to source of function (actually substring of it). Later on in click handler there is comparision:
this.name === tid
which compares name (function in this case) and id which is string equal to substring of function source. Reproducing this is easy. Just in any sample put name to be function. Part of my code is:
colModel: [
{ name: function(obj) {
if (total) {
return obj.values.weight;
} else {
return obj.values.weight * totalNumber;
}
}, index: “calories”, label: “Weight”, width: 78, align: “right”, firstsortorder: 'desc', sorttype: “float” }
]
Best regards,
Bosko