This question is locked. New answers and comments are not allowed.
There seems to be sorting bug in the following scenario:
- two columns bound to the same viewmodel property
- sort by MultiColumn
I binded 2 columns to the same viewmodel property to get a checkboxes column as in this example: http://demos.telerik.com/aspnet-mvc/razor/grid/checkboxesajax
after I sort on the value displaying column I use the Telerik provided this.GridRouteValues() to get the grid properties. The old OrderBy value remains and the new value is appended. The resulting value looks like the following:
MyPropertyName-asc~MyPropertyName-desc
As you can see, the same column is being sorted twice, which creates serious problems down the road. I was able to work around this bug by creating another property in my viewmodel just for binding for checkboxes like so:
Just wanted to bring it to Telerik's attention.
- two columns bound to the same viewmodel property
- sort by MultiColumn
I binded 2 columns to the same viewmodel property to get a checkboxes column as in this example: http://demos.telerik.com/aspnet-mvc/razor/grid/checkboxesajax
after I sort on the value displaying column I use the Telerik provided this.GridRouteValues() to get the grid properties. The old OrderBy value remains and the new value is appended. The resulting value looks like the following:
MyPropertyName-asc~MyPropertyName-desc
As you can see, the same column is being sorted twice, which creates serious problems down the road. I was able to work around this bug by creating another property in my viewmodel just for binding for checkboxes like so:
public
long
PropertyForCheckbox {
get
{
return
MyPropertyName; } }
Just wanted to bring it to Telerik's attention.