It's something I've wondered about for some time now and it's easier in other frameworks I know. I have made an MVC5 web application using razor views and KendoUI with a generic repository for database access.
On the create a form of one of the entities I have there are some KendoUI drop-down list widgets i.e.
@(Html.Kendo().DropDownList()
.Name("Manager")
.Filter("contains")
.DataTextField("ManagerName")
.DataValueField("ManagerName")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetData", "Data");
}).ServerFiltering(false);
}))
This, very simply, grabs its data from the Datacontroller
GetData
method as JSON
. There is no guarantee that all the Managers
our users require will be in this list and so, to make life easier, I want to have a link that brings up a modal or something like that and allows them to add the missing Manager if they can't find it in the list but without leaving the Create
view.
What is the best way to do this? Should I be looking at Asynchronous
controllers top achieve this? Are there any examples that people know of?
Note: My Create
form is in an Ajax
format.