Hi,
I have following kenodgrid
(Html.Kendo().Grid<SSAIFCN.Domain.evViewModel>()
.Name("evGrid")
.Columns(columns =>
{
columns.Bound(x => x.evId).Visible(false);
columns.Bound(x => x.PId).Title("Company").HeaderHtmlAttributes(new { style = "white-space: normal" }).EditorTemplateName("PEEditor") .ClientTemplate("#=CompanyName#")
columns.Command(command =>
{
command.Edit();
command.Destroy();
});
.ToolBar(toolbar => toolbar.Create())
.Editable(editable => editable.Mode(GridEditMode.InLine))
.DataSource(dataSource => dataSource
.Ajax()
.Create(update => update.Action("CreateEV", "EVController"))
------------------PEEditor.cshtml
@model object
@(Html.Kendo().ComboBoxFor(m => m)
.DataTextField("PEtext")
.DataValueField("PEID")
.Placeholder("--Select--")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetPEData", "EVController"); //Set the Action and Controller names.
});
})
---------------- CreateEV controller
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult CreateEV([DataSourceRequest] DataSourceRequest request, evViewModel evt)
{
// create code here
}
Dropdown shows value perfectly in edit mode
Question: when I select he values and update/create the record I don't see any value in "evt.PID ". it is null.
In other words how do I get the value selected in dropdown to model grid and pass on create action
Thanks for your help