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

Display text from drop downlist after save item

1 Answer 29 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mateusz
Top achievements
Rank 1
Mateusz asked on 10 Dec 2015, 03:38 PM

Hi

I would like ask how to improve  example below to display text from drop down list after save item?

https://github.com/telerik/ui-for-aspnet-mvc-examples/tree/master/grid/grid-editing-cascading-dropdownlist

Drop down lists work as I need but after save I see id. How to change it to display text for example category name.

 

 

1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 14 Dec 2015, 09:39 AM

Hello Mateusz,

 

In the current example the columns of the grid are bound to a property from integer type. In other words the "LicenseId" is a number and it will be shown as number. My suggestion is to bound the columns to complex object ( you can use the pattern shown in the Grid / Editing custom editor with Category field). The model field "Category" is a complex object and using template it is shown the text when cell is in read only mode. Just in case you can set valuePrimitive to false for the cascading DropDownLists in order to update the grid model with a complex object instead of just the number. 

 

Regards,
Boyan Dimitrov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Mateusz
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or