0
votes

How to get check box checked rows from Kendo grid in jquery. And to get a field value of the selected row. I need to validate a field in the selected row. Please see the code currently i am using,

ibgrid.tbody.find(":checked")
        .each(function (id) 
{

 alert($(this).val())

});

alert($(this).val()) shows the value of the selected row. but i don't know how to get each row of the checkbox checked row.

I am using MVC 4, please help :(

1
could you please show the generated HTML ?Spokey

1 Answers

-1
votes
function onMailMenuClick(e) {

   var grid = $('#MsgGrid').data().kendoGrid;
   $.each(grid.dataSource.view(), function () {
      var ischecked = grid.tbody.find(":checked")
      var strSelectedIds = "";
      $.each(ischecked, function () {
         if (strSelectedIds != "")
            strSelectedIds += "|" + $(this).attr("id");
         else
            strSelectedIds += $(this).attr("id");
      });
   });
}