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

Generic Dropdown Editor Template???

1 Answer 233 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Greg
Top achievements
Rank 1
Greg asked on 18 Mar 2015, 07:36 PM
I'm creating all of these grids in different views and many require custom edit template.  The pattern I'm having to create is a bunch of editor templates for the dropdowns.  Is there a way to reuse the editor types with different models. The answer might be no, I just don't have yet the experience with mvc and editor templates for the answer.

My limited and not realistic way would be to have the classes used for the dropdown to inherit from a "BaseDropDown" that has the text and value properties.  Then have a case statement determine which dataveiw to use when binding.


Greg

1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 20 Mar 2015, 11:27 AM
Hello Greg,

Please note that UI for ASP.NET MVC Grid relies on the ASP.NET MVC editor templates which provides efficient way to reuse the same editor across different models using the "UIHint" attribute. More information on the matter can be found on various resources over the internet. As a starting point you can check the following help article for the Grid:

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
Greg
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Share this question
or