"change" event is being generated when I click on already selected row.
Moreover the event is generated when I click in any place of detail row (in master-detail mode) if it contains a table with td's.
Also the event's handler arguments don't have any data about event context (i.e selected row), so I have to call "select()". That's not obvious. It's more naturally to get selected row in event handler. Also there's "current()" method which seems to be more suitable for getting currently selected row, but it returns undefined.
UPDATE:
When you're creating kendo.ui.Selectable inside Grid :
that.selectable = new kendo.ui.Selectable(that.table, {
filter: cell ? CELL_SELECTOR : ROW_SELECTOR,
multiple: multi,
change: function () {
that.trigger(CHANGE);
}
});
where ROW_SELECTOR = "tbody>tr:not(.k-grouping-row,.k-detail-row):visible"
you should specify "direct" selector:
ROW_SELECTOR = ">tbody>tr:not(.k-grouping-row,.k-detail-row):visible",
But unfortunetly it doesn't help when detail panel constains another grid.
Just take you sample http://demos.kendoui.com/web/grid/detailtemplate.html and add "seletable: 'row'" into the first grid. And add handle for "change" event:
element.bind("change", function (e) {
var td = this.select();
console.log("selected: " + td);
});
then notice that it logs rows when you selected rows inside nested grid.
Moreover the event is generated when I click in any place of detail row (in master-detail mode) if it contains a table with td's.
Also the event's handler arguments don't have any data about event context (i.e selected row), so I have to call "select()". That's not obvious. It's more naturally to get selected row in event handler. Also there's "current()" method which seems to be more suitable for getting currently selected row, but it returns undefined.
UPDATE:
When you're creating kendo.ui.Selectable inside Grid :
that.selectable = new kendo.ui.Selectable(that.table, {
filter: cell ? CELL_SELECTOR : ROW_SELECTOR,
multiple: multi,
change: function () {
that.trigger(CHANGE);
}
});
where ROW_SELECTOR = "tbody>tr:not(.k-grouping-row,.k-detail-row):visible"
you should specify "direct" selector:
ROW_SELECTOR = ">tbody>tr:not(.k-grouping-row,.k-detail-row):visible",
But unfortunetly it doesn't help when detail panel constains another grid.
Just take you sample http://demos.kendoui.com/web/grid/detailtemplate.html and add "seletable: 'row'" into the first grid. And add handle for "change" event:
element.bind("change", function (e) {
var td = this.select();
console.log("selected: " + td);
});
then notice that it logs rows when you selected rows inside nested grid.