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

Foreign key Name based sort in telerik grid

1 Answer 325 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pantulu
Top achievements
Rank 1
Pantulu asked on 19 Mar 2015, 03:06 PM
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 ?

1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 23 Mar 2015, 09:23 AM
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).

Regards,
Vladimir Iliev
Telerik
 

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.

 
Tags
Grid
Asked by
Pantulu
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Share this question
or