Hi, I've been working with telerik mcv grid, i've used a modelview to pass the data to the controller. Now i want the user to be available to edit the row information but every time the user presses the edit button on the grid the modal window shows the item id which is not suposed to be displayed
This is the modelview
public class EmpleadoViewModel { public int EmpleadoID { get; set; } [Required] public String Nombre { get; set; } [Required] public String Email { get; set; } [Required] public String Activo { get; set; } [Required] public String Role { get; set; } }
This is the grid config
@(Html.Kendo().Grid<EmpleadoViewModel>() .Name("people_grid") .Columns(columns => { columns.Bound(e => e.Nombre).Title("Nombres").HeaderHtmlAttributes(new { style = "text-align:center" }); columns.Bound(e => e.Email).Title("E-Mail").HeaderHtmlAttributes(new { style = "text-align:center" }); columns.Bound(e => e.Activo).Title("Estado").HeaderHtmlAttributes(new { style = "text-align:center" }); columns.Bound(e => e.Role).Title("Rol de sitio").HeaderHtmlAttributes(new { style = "text-align:center" }); columns.Command(command => { command.Edit().Text("Editar").HtmlAttributes(new { @class = "sharp", onmouseover = "editBtnPopover(this)", onmouseout="hidePopover(this)" }); command.Custom("Deshabilitar").Click("disablePerson").HtmlAttributes(new { @class = "sharp", onmouseover = "disableBtnPopover(this)", onmouseout = "hidePopover(this)" }); }).Title("Acciones").HeaderHtmlAttributes(new { style = "text-align:center" }); }) .ToolBar(toolbar => { toolbar.Create().Text("Nuevo").HtmlAttributes(new { id="new_btn" }); }) .HtmlAttributes(new { style = "height:550px;" }) .Editable(editable => editable.Mode(GridEditMode.PopUp).Window(window => { window.Draggable(false); window.Title("ICS: Personas"); })) .Scrollable() .Sortable() .Pageable(pageable => { pageable.Refresh(false); pageable.PageSizes(true); pageable.ButtonCount(5); }) .Events(events => events.Change("getSelectedItem")) .DataSource(dataSource => dataSource .Ajax() .PageSize(10) .Model(model => { model.Id(emp => emp.EmpleadoID); model.Field(emp => emp.EmpleadoID).Editable(false); }) .Create(update => update.Action("EditingPopup_Create", "Grid")) .Read(read => read.Action("Read_Alpes_Employees", "Demo")) .Update(update => update.Action("EditingPopup_Update", "Grid")) .Destroy(update => update.Action("EditingPopup_Destroy", "Grid")) ) )