Generic Dropdown Editor Template???

2 posts, 0 answers
  1. Greg
    Greg avatar
    28 posts
    Member since:
    Dec 2014

    Posted 18 Mar 2015 Link to this post

    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
  2. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2196 posts

    Posted 20 Mar 2015 Link to this post

    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.

     
Back to Top