This is a migrated thread and some comments may be shown as answers.

Sort a column by another column

1 Answer 322 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 17 Nov 2015, 04:02 PM

Hi,

I am using Kendo UI for MVC.  I have a string column containing string numbers.  I also have a hidden int column containing the integer version of these numbers.  I would like for the user to sort the string number column, but have the sorting actually take place using the hidden number column.  How would I go about this with Kendo UI for MVC? 

 

Thanks.

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 19 Nov 2015, 09:06 AM
Hi Kevin,

This can be done by using a column bound to the numeric values that also uses a Template, which actually renders the string values. For example: 
columns.Add().Field(e => e.NumericField).Width(220).Template("#=NumbersAsText#");

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
TreeList
Asked by
Kevin
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or