In hierarchical grid i want to expand detail row on mouse click any where on a master row instead of expand/collapse icon. may i know how i can do that?
2 Answers, 1 is accepted
0
Accepted
Preslav
Telerik team
answered on 24 Nov 2017, 09:04 AM
Hi Muhammad,
To achieve the desired behavior use the expandRow and collapseRow methods of the Grid.
When you click on the edit button, the page crashes.
How to solve this?
Georgi Denchev
Telerik team
commented on 16 Jun 2023, 09:48 AM
Hi, Richard,
Thank you for the provided sample.
The crash isn't related to the above approach, it is a bug in the older versions of Kendo UI. You can exclude the command cell from the logic like so:
if(target.is(".k-command-cell *")) {
return;
}
However, the crash will still occur because of the bug. You can use a custom command and prevent the default behavior of the <a> element, but I'd recommend that you upgrade the library instead:
{
command: [{
name: "edit",
click: function(e) {
e.preventDefault();
var tr = $(e.target).closest("tr");
var data = this.dataItem(tr);
$("#grid").data("kendoGrid").editRow(tr);
}
}]
}