I have a Kendo grid with drop down lists and its prefectly working but a one problem....
my grid field Values doesn't change to drop down list new "selected index"..
my Kendo Grid:
@(Html.Kendo().Grid<marsyeh.Models.MarsyehGridVM>()
.Name("3-Grid")
.Columns(columns =>
{
columns.Bound(C => C.id).Hidden(true);
columns.Bound(C => C.Maddah).ClientTemplate("#=Maddah.Name#");
columns.Bound(C => C.Massum).ClientTemplate("#=Massum.Name#");
columns.Bound(C => C.Tem).ClientTemplate("#=Tem.Name#");
columns.Bound(C => C.Event).ClientTemplate("#=Event.Name#");
columns.Command(C => { C.Destroy().Text("حذف"); }).Width(200);
})
.ToolBar(toolbar =>
{
toolbar.Save();
})
.Filterable()
.Editable(editable => editable.Mode(GridEditMode.InCell))
.Pageable()
.Groupable(g => g.Messages(M => M.Empty("برای گروه بندی؛ عنوان ستون مورد نظر را به اینجا Drag کنید ")))
.Navigatable()
.Sortable()
.Reorderable(re => re.Columns(true))
.DataSource(dataSource => dataSource
.Ajax()
.Batch(true)
.ServerOperation(true)
.PageSize(10)
.Events(events => events.Error("error_handler"))
.Model(model =>
{
model.Id(p => p.id);
})
.Read(read => read.Action("SeeMarsyeh2", "Marsyehs"))
.Update("EditByGrid", "Marsyehs")
.Destroy("DeleteByGrid", "Marsyehs")
)
)
********
and one of My Drop Down Editor :
@model marsyeh.Models._Tem
@(Html.Kendo().DropDownList().Name("Tem2DropDown")
.DataTextField("Name")
.DataValueField("id")
.DataSource(D => D
.Read(Read => Read.Action("ForDropDownList", "Tems"))
)
)
And I Used " [UIHint("Tem2DropDown")]" in model to relating column with Editor and it worked ...