Mostly, I would like to know how to obtain a handle on the parent row once I click on a child row in the detail grid.
I have a code sample here, the end goal being to highlight the parent row if a child row is checked:
$("#gridMasterInfo").delegate('tbody>tr .childcheckbox', 'click', function (e) {
var parentcheckbox = $(this).closest("tbody>tr");
var parentrow = $(this).closest("tbody").next().find("tr"); // Tried this, but no go. What here?
var childrow = $(this).closest("tr");
if (childrow.hasClass('k-state-selected')) {
childrow.removeClass("k-state-selected");
} else {
childrow.addClass("k-state-selected");
parentrow.addClass("k-state-selected");
}
})
Here's my css:
.childcheckbox, .parentcheckbox {}
Thanks for the help,