How to get row data in kendo grid when button is clicked

Let us consider their is a edit button in kendo  grid as shown below

ex:           {
                    command: [{
                        name: "edit",
                        className: "btn-Edit",
                        text: "Edit", click: btnEdit
                    }], title: "Action", media: "(min-width: 500px)", width: "220px"
                }

Now In btnEdit() function we get the button clicked row data using jquery as shown,

ex:      function btnEdit(e) {
            var grid = $("#gridName").getKendoGrid();
            var item = grid.dataItem($(e.target).closest("tr"));
            //here item contains all row data
           }

Comments

Popular posts from this blog

How to get the user details, user current level, next level, Rank in sql server

How to update the user level when ever user report any tweet in sql

Implement virtualisation in kendo drop down list using jquery ajax in mvc, aspx page