error.Cannot use a lambda expression as an argument to a dynamically dispatched operation without first casting it to a delegate or expression tree type
Code:
//Used for the Ajax binding
[
GridAction]
public ActionResult _AjaxBinding()
{
ProjectViewModel objProjectViewModel = new ProjectViewModel();
objProjectViewModel.ProjectList = Repository.GetProjects();
return View(new GridModel<MvcMyAPP.T_Project>(objProjectViewModel.ProjectList));
}
---GRID-----
@{Html.Telerik().Grid(Model)
.Name(
"Grid")
//.Editable(editing=> editing.Mode(GridEditMode.PopUp)
.ToolBar(t => t.Insert().ButtonType(
GridButtonType.Image))
.DataKeys( keys=>keys.Add(c=>c.ProjectId))
.DataBinding(dataBinding => dataBinding.Ajax().Select(
"_AjaxBinding", "Home")
.Insert(
"Insert", "Home")
.Update(
"Save", "Home")
.Delete(
"Delete", "Home"))
.Columns(c=>{
c.Bound(o=>o.Title);
c.Bound(o => o.Description);
c.Bound(o => o.ProjectStatus);
c.Bound(o => o.CreatedBy);
c.Bound(o => o.CreatedDate);
c.Command(commands =>
{ commands.Edit().ButtonType(
GridButtonType.Image);
commands.Delete().ButtonType(
GridButtonType.Image); }).Width(200);
}
)
.Pageable()
.Sortable()
.Filterable()
.Render();
}