Reputation: 11
how to get the checkbox selected row values from Kendo Grid UI while pagination in MVC using Jquery,
checkbox selected row values from Kendo Grid UI while pagination
I have followed the above link to get my work done, I can able to get the current page selected row values, but am not able to get all the page selected row values.can you pls help me , how to get all the checkbox selected row values even pagination also. Ex: first page i'm selecting 2 row and the second page i'm selecting 2 row means when click of button 4 rows shoud get pass to the controller, pls help.
Upvotes: 1
Views: 2738
Reputation: 123
You can get it working using the PersistSelection functionality as in this demo: https://demos.telerik.com/aspnet-mvc/grid/checkbox-selection
Than you can get the row values this way:
$('#btnSave').click(function (e){
var grid = $("#grid1").data("kendoGrid");
grid.selectedKeyNames().forEach(function (id) {
console.log(grid.dataSource.get(id).ProductID);
});
}
Upvotes: 1