HI, i have implemented a custom sort on a grid column (coffeescript) like this:
sortable:
compare: (a, b) ->
# tech note: this is supposed to work, but the code is never called http://onabai.wordpress.com/2013/09/28/kendoui-grid-custom-sorting-algorithms/
aName = _.findWhere(Dragon.prefetchData.get('supportingDocuments'), id: a)?.name
bName = _.findWhere(Dragon.prefetchData.get('supportingDocuments'), id: b)?.name
if aName > bName then return 1
if aName < bName then return -1
return 0
but the compare function is never called - what am i doing wrong?
sortable:
compare: (a, b) ->
# tech note: this is supposed to work, but the code is never called http://onabai.wordpress.com/2013/09/28/kendoui-grid-custom-sorting-algorithms/
aName = _.findWhere(Dragon.prefetchData.get('supportingDocuments'), id: a)?.name
bName = _.findWhere(Dragon.prefetchData.get('supportingDocuments'), id: b)?.name
if aName > bName then return 1
if aName < bName then return -1
return 0
but the compare function is never called - what am i doing wrong?