This question is locked. New answers and comments are not allowed.
Ok so I have this grid inside a partial view and whenever you edit an item then click the confirm button, it does a quick refresh that removes the data's Command column (the header column is still there). Any idea what's causing this?
view:
Controller:
view:
@model AssessmentModels.FilterDateModel<div class="view_panel"> @{ Html.Telerik().Grid<AssessmentModels.FilterDateModel.RowItem>(Model.Items) .Name("gridDate") .DataKeys(keys => { keys.Add(c => c.Type); }) .Columns(columns => { columns.Bound(o => o.Type); columns.Bound(o => o.StartDate) .HeaderHtmlAttributes(new { style = "text-align:center;" }) .FooterHtmlAttributes(new { style = "text-align:center;" }) .HtmlAttributes(new { style = "text-align:center;" }) .Width(100); columns.Bound(o => o.EndDate) .HeaderHtmlAttributes(new { style = "text-align:center;" }) .FooterHtmlAttributes(new { style = "text-align:center;" }) .HtmlAttributes(new { style = "text-align:center;" }) .Width(100); columns.Bound(o => o.Group) .GroupHeaderTemplate(@<text>@item.Key</text>) .Hidden(); columns.Command(commands => { commands.Edit().ButtonType(GridButtonType.Image); }) .Title("Edit") .HeaderHtmlAttributes(new { style = "text-align:center;" }) .FooterHtmlAttributes(new { style = "text-align:center;" }) .Width(60); }) .DataBinding(dataBinding => { dataBinding.Ajax() .Select("FilterDateGrid_Select", "Assessment") //.Insert("FilterDateGrid_Insert", "Assessment") .Update("FilterDateGrid_Save", "Assessment") .Delete("FilterDateGrid_Delete", "Assessment"); }) .Scrollable(scrolling => scrolling.Height(450).Enabled(true)) .Sortable(sorting => sorting.Enabled(false)) .Editable(editing => editing.Mode(GridEditMode.InLine)) .Pageable(paging => paging.Enabled(false)) .Footer(false) .Render(); }</div>Controller:
#region Date Gridpublic ActionResult FilterDateGrid_Edit(){ return View();}[GridAction]public ActionResult FilterDateGrid_Select(){ return View(new GridModel(_vm.FilterDate.Items));}[AcceptVerbs(HttpVerbs.Post)][GridAction]public ActionResult FilterDateGrid_Save(string id){ AssessmentModels.FilterDateModel.RowItem item = _vm.FilterDate.OneItem(i => i.Type == id); TryUpdateModel(item); _vm.FilterDate.UpdateItem(item); return View(new GridModel(_vm.FilterDate.Items));}#endregion Date Grid