Hi all,
I have a kendo UI grid, then I set it as edit. In Grid row, when I click the "Edit", it will have a . In this popup editor, I have the dropDownList to select the value.
Now my problem is, my value and dropDownList is separate, which is supposed to together.
I attach my code for view.
<div style="margin-left:20px; margin-bottom: 20px">
<div>
@Html.LabelFor(model => model.Name)
</div>
<div>
@Html.EditorFor(model => model.Name)
@Html.ValidationMessageFor(model => model.Name)
@(Html.Kendo().DropDownList()
.Name("Name2")
.DataTextField("Name")
.DataValueField("ComputerID")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("SelectAll", "Computer"); //Set the Action and Controller names.
})
.ServerFiltering(true); //If true, the DataSource will not filter the data on the client.
})
)
</div>
</div>