Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kendo UI Grid Get Row Values

Tags:

kendo-grid

I am trying to get the row item values (name, email, age) but I'm only able to get the first item by using the code below.

How can I get other row text by changing tr:eq(1) code or is there any other way to get two items value?

$("#grid_").kendoDropTarget({
    drop: function (e) {
        var data = grid.dataItem("tr:eq(1)");
        // I only get first row but I need to dynamically get any row items.
        alert(data.name);
    }
});
like image 797
uiuxhub Avatar asked Oct 18 '13 20:10

uiuxhub


1 Answers

plz try this..

var entityGrid = $("#DataGrid").data("kendoGrid");       
var data = entityGrid.dataSource.data();
var totalNumber = data.length;

for(var i = 0; i<totalNumber; i++) {
    var currentDataItem = data[i];
    VersionIdArray[i] = currentDataItem.VersionId;
}
like image 112
Sanjay Rabadiya Avatar answered Feb 03 '23 07:02

Sanjay Rabadiya