Hi, I have a grid with inline option, and when I edit a row, a later I click in cancel button, the data in row selected is changed.
The grid is:
$("#grid").kendoGrid({
dataSource: sharedDataSource,
toolbar: [ { "create", text: "Add new Prodduct Group" }],
editable: "inline",
change: onChange,
selectable: true,
height: 400,
sortable: true,
pageable: true,
columns: [
{ field: "strProdGroupDesc", title: "Product Group", nullable: false, filterable: false },
{ command: ["edit"], title: " ", width: "110px" }
]
})
function onChange(arg) {
var grid = this;
grid.select().each(function() {
var dataItem = grid.dataItem($(this));
PGDesc = dataItem.strProdGroupDesc;
PGId = dataItem.intProdGroupId;
alert("Item: " + PGId + "-" + PGDesc);
});
}
The grid is:
$("#grid").kendoGrid({
dataSource: sharedDataSource,
toolbar: [ { "create", text: "Add new Prodduct Group" }],
editable: "inline",
change: onChange,
selectable: true,
height: 400,
sortable: true,
pageable: true,
columns: [
{ field: "strProdGroupDesc", title: "Product Group", nullable: false, filterable: false },
{ command: ["edit"], title: " ", width: "110px" }
]
})
function onChange(arg) {
var grid = this;
grid.select().each(function() {
var dataItem = grid.dataItem($(this));
PGDesc = dataItem.strProdGroupDesc;
PGId = dataItem.intProdGroupId;
alert("Item: " + PGId + "-" + PGDesc);
});
}