It is not good practice to use ".ToolBar(commands => commands.Insert())" .This will work just for very simple models.
You should use custom commands :
.ToolBar(toolBar => toolBar.Template( @<text>
@Html.ActionLink("Add new ", "Action", "Controller",null, new { @class = "t-button", })</text>))
, for insert ,
and custom command for edit :
columns.Command(commands =>
{
commands.Custom("Update").Text("Update")
.SendState(true).SendDataKeys(true)
.HtmlAttributes(new { f = "btnEdit" }).
Action("Action", "Controller").Ajax(false);
}).Width("15%").Title("Title");
If you still want to use .ToolBar(commands => commands.Insert())
,you should have in your grid something like this :
.DataBinding(dataBinding =>
{
dataBinding.Ajax()
.Select("Action", "Controller")
.Insert("Action", "Controller")
.Update("Action", "Controller")
.Delete("Action", "Controller");
})
And now you should to have in Shared Folder in folder named EditorTempaltes and in this folder your partial views named like grid model ,but this is not good practice.