This question is locked. New answers and comments are not allowed.
Hi
I'm trying to insert data in my grid by using the popup mode but it not working at all. I always receive the error "Value cannot be null. Parameter name: name". If i'm using the inline mode, the operation works as expected. I dont understand where my problem can be since no additionnal code seems to be needed to work in popup mode instead of inline mode.
Thanks in advance
There is my Grid definition :
@{ Html.Telerik().Grid<TableauDeBordDeGestion.Models.AnalyseViewModel>() .Name("GridAnalyses") .DataKeys(keys => keys.Add(o => o.Id).RouteKey("idAnalyse")) .ToolBar(commands => commands.Insert()) .DataBinding(databinding => databinding .Ajax() .Select("AnalysesAjax", "tb") .Update("UpdateAnalyse", "tb") .Delete("DeleteAnalyse","tb") .Insert("InsertAnalyse", "tb") ) .Columns(columns => { columns.Bound(o => o.Commentaire).Title("Commentaire").Encoded(false); columns.Bound(o => o.DateAjout).Title("Date ajout").Format("{0:yyyy-MM-dd}").ReadOnly(true); columns.Command(commands => commands.Delete().ButtonType(GridButtonType.Image)); columns.Command(commands => commands.Edit().ButtonType(GridButtonType.Image)); }) .ClientEvents(events => events.OnEdit("onEdit")) .Editable(editing => editing.DefaultDataItem(new TableauDeBordDeGestion.Models.AnalyseViewModel { DateAjout = DateTime.Now, Usager = HttpContext.Current.User.Identity.Name })) .Editable(editing => editing.Mode(GridEditMode.PopUp)) .Sortable() .Groupable(grouping => grouping .Groups(groups => { groups.Add(c => c.DateAjout); groups.Add(c => c.Usager); })) .Pageable(pagerAction => pagerAction.Position(GridPagerPosition.Bottom)) .Pageable(pagerAction => pagerAction.PageSize(10)) .Render(); }