Foreign key Name based sort in telerik grid

2 posts, 0 answers
  1. Pantulu
    Pantulu  avatar
    10 posts
    Member since:
    Feb 2015

    Posted 19 Mar 2015 Link to this post

    I have a foreign key column in my grid.
       columns.ForeignKey(c => c.ManagerId, (SelectList)ViewData["ManagerIdSource"]);

    It sorts by the default Guid and not by the name.
    Any way I can achieve this ?

    If not supported, is this feature expected anytime soon from Telerik ?
  2. Vladimir Iliev
    Vladimir Iliev avatar
    2206 posts

    Posted 23 Mar 2015 Link to this post

    Hi Pantulu,

    Sorting by text is not supported as the data source will not have all the data (for more information you can check the related item in Kendo UI UserVoice). Possible solution is shown in the following demo in our documentation:

    Another option which is valid for the MVC wrappers is to add the custom field to the ViewModel and populate it either on the server side or on the client side after the data is loaded (e.g. DataBound event).

    Vladimir Iliev

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top