I am using JSON To populate the AutoComplete List of the MultiSelect like Below:
Controller
Razor:
Can I bind the Value to a list that is not in the list I am using for the auto-complete list?
I attached a image.
If the user wanted to type a name and add it, or if the value being bound are not in the list can it be added?
When saved the items would then appear in the list.
Controller
public JsonResult PopList(string name)
{
var lstNames = db.GetNames.Select(e => new
{
name = e.OrgNames
});
return Json(orgs, JsonRequestBehavior.AllowGet);
}
@(Html.Kendo()
.MultiSelect()
.Name("nameBox")
.AutoBind(true)
.Placeholder("Select names...")
.DataTextField("name")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("PopList", "ListNames");
})
.ServerFiltering(true);
})
)I attached a image.
If the user wanted to type a name and add it, or if the value being bound are not in the list can it be added?
When saved the items would then appear in the list.