Thanks for your kind replies. We've figured it out with a bit of searching and the like.
Firstly "kudos" to "this post" on the kendoui site as it pointed me in the right direction.
It turns out that this is what we need: -
In the. cshtml file for the grid...
// .... Other grid stuff .ToolBar(toolbar => { toolbar.Custom().Text("Test Button").Url("#").HtmlAttributes(new { @class = "test-button" }); }) // And then also... $(document).ready(function () { $(".test-button").click(testFunction) }) // And finally function testFunction(e) { kendoConsole.log("Items Selected"); e.preventDefault(); var grid = $("#Grid").data("kendoGrid"); var selection = []; grid.select().each( function () { var dataItem = grid.dataItem($(this)); selection.push(dataItem); } ); $.ajax({ type: "POST", url: "Users/Users_DeleteSelected", data: JSON.stringify({ items: selection }), dataType: "html", contentType: "application/json; charset=utf-8", success: function (form) { document.open(); document.write(form); document.close(); } }); };
Then in the controller we simply have: -
[HttpPost] public ActionResult Users_DeleteSelected(List<UserViewModel> items) { // Stub to redirect for now return RedirectToAction("Index"); }
And that's it. All of the items currently selected in the grid will be posted back to the correct action method and the jobs done.
Thanks.