Sort a column by another column

2 posts, 0 answers
  1. Kevin
    Kevin avatar
    15 posts
    Member since:
    Feb 2014

    Posted 17 Nov 2015 Link to this post


    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? 



  2. Alexander Popov
    Alexander Popov avatar
    1411 posts

    Posted 19 Nov 2015 Link to this post

    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#");

    Alexander Popov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top