I'm having some issues getting the kendo grid for mvc to work properly (especially the add button in the toolbar). I have a grid with editing in a popup window. For this I'm using a custom template which is in Views/Location/EditorShow.
The edit command is working just fine since this is showing up a popup for the user to edit data in (basically this loads Views/Location/EditorShow like I want it to). The delete command is also working just fine too.
The problem however is the Add command which is situated inside the toolbar. This one does not seem to have a correct url (it's pointing to the root of the website). Also find attached a screenshot showing to source of the add button. If I surf to ?GridLocations-mode=insert manually however a create popup is showing up.
Quite a strange situation, because there seems to be only a problem with the url of the add button in the toolbar.
Any ideas on what may be causing this??
P.S. Below is the code I'm using in my .cshtml file:
I don't think this does contain any strange stuff, since it's mostly the same as the examples on the website.
Any thoughts on why the add button is not working properly like expected?
The edit command is working just fine since this is showing up a popup for the user to edit data in (basically this loads Views/Location/EditorShow like I want it to). The delete command is also working just fine too.
The problem however is the Add command which is situated inside the toolbar. This one does not seem to have a correct url (it's pointing to the root of the website). Also find attached a screenshot showing to source of the add button. If I surf to ?GridLocations-mode=insert manually however a create popup is showing up.
Quite a strange situation, because there seems to be only a problem with the url of the add button in the toolbar.
Any ideas on what may be causing this??
P.S. Below is the code I'm using in my .cshtml file:
@Html.Kendo().Grid(Model).Name("GridLocations").Columns(columns =>
{
columns.Bound(l => l.Name).Title("Name");
columns.Command(command =>
{
command.Edit().Text("Edit");
command.Destroy().Text("Delete");
}).HeaderTemplate("Manage");
}).ToolBar(toolbar => toolbar.Create().Text("Create")).DataSource(dataSource => dataSource
.Server()
.Model(model => model.Id(l => l.Id))
// Configure CRUD -->
.Create(create => create.Action("Create", "Locations"))
.Read(read => read.Action("Index", "Locations"))
.Update(update => update.Action("Update", "Locations"))
.Destroy(destroy => destroy.Action("Delete", "Locations"))
// <-- Configure CRUD
).Editable(editable => editable.Mode(GridEditMode.PopUp).TemplateName("EditLocations"))
I don't think this does contain any strange stuff, since it's mostly the same as the examples on the website.
Any thoughts on why the add button is not working properly like expected?