Where would this 'int' come from? You get 2 transforms in your sort function. Just look at UIGrid.SortByName, for example. You can set the custom callback via grid.onCustomSort = YourSortFunc;, but your "YourSortFunc" still has to accept 2 transforms as the parameters.