Is there a template that I can use to edit drop-down lists in an MVC3 application?

I am looking for a general reusable template that I can use to edit the contents of dropdowns in my MVC3 application. That is, some Id-Name pairs used to fill out drop-down lists for editing exist only for this purpose and do not have a separate controller setting. For example. Industries and sectors for training modules. Each list is just an Id-Name structure, but the sector also has an IndustryId value.

Now I really don't want to use standard prominent forests for them, i.e. create, edit and list with links, but I can not help but wonder how best to improve them. Should I link each list to an editor that just displays the EditorFor text box for each item in the list, with jQuery to add a new item or delete an item? Is there any specific way to do this?

NOTE. . This is not loading a downloadable list. This is about loading values โ€‹โ€‹for a drop-down list into a view for editing them to control what is displayed in the drop-down list when it is loaded by any means.

+8
asp.net-mvc asp.net-mvc-3
source share
2 answers

I donโ€™t know if there is a sample as such, but we are dealing with similar things (dozens of search tables with the same structure), and we use simple pages with jqGrid. Editing is lively in the sense that changing a string causes an Ajax call to the controller to change the search value itself. It works well. We got a dedicated view for each of the editable lookup tables (not all of them), but it would be quite simple to use the same view, the controller and the client side of the script for all of them.

+1
source share

You can use jQuery and the jQuery user interface to configure dropdown lists

0
source share

All Articles