Reputation: 39278
Is there a way in the Telerik MVC grid to tell the client side sort to sort by an alternate value than the bound value
columns.Bound(p => p.Icon).Template(p => p.Icon).ClientTemplate("<#=Icon#>")
I don't want to base the sort on The icon which is an image tag, but rather on some Id column in a hidden field. Is this possible? Also I think I would run into a similar problem when doing client side sorting of dates if I bind my grid to a formated date, and not the raw DateTime fom the db?
Upvotes: 0
Views: 1219
Reputation: 39278
I solved it myself.
columns.Bound(p => p.Id).Template(p => p.Icon).ClientTemplate("<#=Icon#>");
This way I can maintain the image during client sort, but still order by Id
Upvotes: 1