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

    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.

  2. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 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#");

    Regards,
    Alexander Popov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
Back to Top