Newie, so be kind...
I have 2 models, People and Projects.
People have ID and Name
Project has 4 differenct People references
PM, LD, Client, SME
People db has 500K records so, viewdata is not an option for combo bind.
Editor template is strongly typed to Project
I have the records selected in the combox from People, but canNOT update the Projects model...
On smaller object, 'Status' selection and bind work great using viewdata.
How do I do this without using the viewdata bind to?
Code snipet:
Can't get it to work:
@(Html.Kendo().ComboBox()
.Name("ProjectManagerID") -- in Project model
.DataTextField("EmpName") -- in person model
.DataValueField("EmpID") - in person model
.Filter("contains")
.MinLength(4)
.HtmlAttributes(new { style = "width: 250px" })
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetEmployee", "Employee")
.Data("DonAdditionalData");
})
.ServerFiltering(true);
})
)
Works Great:
@(Html.Kendo().DropDownList()
.Name("StatusID")
.DataTextField("StatudsDesc")
.DataValueField("StatusID")
.BindTo((System.Collections.IEnumerable)ViewData["sType"]))
I have 2 models, People and Projects.
People have ID and Name
Project has 4 differenct People references
PM, LD, Client, SME
People db has 500K records so, viewdata is not an option for combo bind.
Editor template is strongly typed to Project
I have the records selected in the combox from People, but canNOT update the Projects model...
On smaller object, 'Status' selection and bind work great using viewdata.
How do I do this without using the viewdata bind to?
Code snipet:
Can't get it to work:
@(Html.Kendo().ComboBox()
.Name("ProjectManagerID") -- in Project model
.DataTextField("EmpName") -- in person model
.DataValueField("EmpID") - in person model
.Filter("contains")
.MinLength(4)
.HtmlAttributes(new { style = "width: 250px" })
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetEmployee", "Employee")
.Data("DonAdditionalData");
})
.ServerFiltering(true);
})
)
Works Great:
@(Html.Kendo().DropDownList()
.Name("StatusID")
.DataTextField("StatudsDesc")
.DataValueField("StatusID")
.BindTo((System.Collections.IEnumerable)ViewData["sType"]))