Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
365
Differentiate between parent grids and subgrids on double-click
posted

Hello,

The problem I'm facing is that we a hierarchical grid with one layer of data-depth (so each parent row has 1 child grid).  The problem is we want to determine on click of each of the rows and determine whether it was from the parent grid or one of the child grid rows and grab said row's data id.  I have used an example from another thread on how to get the id on double-click like so:

$(gridName).dblclick(function(event) {
   var row = $(event.target).closest('tr'); // Finds the active row
                                                        // clicked
   var key = row.attr("data-id"); // Obtains the primary key of the row
});

Based on the dblclick event, what is the best practice to differentiate if the tr is from the parent grid or one of the sub-grids?

Thanks.

Parents Reply Children
No Data