This question is locked. New answers and comments are not allowed.
I create the grid like so:
Html.Telerik().Grid<myapp.Date>("dates")
.Name("MyGrid")
.Pageable(paging => paging.PageSize(10))
.Sortable()
.Filterable()
.Groupable()
.DataKeys(keys => keys.Add(c => c.id))
.DataBinding(dataBinding =>
{
dataBinding.Ajax()
.Select("_SelectAjaxEditing", "Dates")
.Insert("_InsertAjaxEditing", "Dates")
.Update("_SaveAjaxEditing", "Dates")
.Delete("_DeleteAjaxEditing", "Dates");
})
.ToolBar(commands => commands.Insert())
.Columns(columns =>
{
columns.Bound(o => o.name);
columns.Bound(o => o.date1);
columns.Command(commands =>
{
commands.Edit().ButtonType(GridButtonType.Text);
commands.Delete().ButtonType(GridButtonType.Text);
});
})
.Editable(editing => editing.Mode(GridEditMode.InLine))
.Render();
%>
and it runs fine, but if I change the GridEditMode to be anything other than InLine I get the following error:
The model item passed into the dictionary is of type 'myapp.Date', but this dictionary requires a model item of type 'System.Nullable`1[System.DateTime]'.
There is a system.DateTime field in the grid, is that the reason for this error?