I'll make this an answer because I suspect it's currently the correct approach, though as with any ASP.NET MVC answer it's likely to become incorrect in the next version...
Html.EditorForModel()
is, as you may know, simply a helper with the same result as Html.EditorFor(model => Model)
. The current behavior of which, I suspect, is somewhat limited to primitive types on any given model. Handy for certain, but not as robust as your model seems to need.
While Html.EditorFor(m => m.MyDropDown)
is smart enough to use the correct template as the editor, I don't believe Html.EditorFor(model => Model)
is smart enough to use the correct template for any given property on the model, only the model itself. (There could likely be very good reasons for this, and the implementation of it may have been a trade-off between that flexibility and some problems which may have arisen from that flexibility.)
I imagine the approach required at this time is to create a custom editor template for MyModel
. Internal to that template you can use Html.EditorFor(m => m.MyDropDown)
which will in turn use its template. I just suspect that nested custom templating has to be manual, not automatic.