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.
Thanks, Angel. I was able to figure this out!
Hi Patrick
once you have the row's TR, you can easily differentiate if it's coming from the root grid, or from a child grid:
var isRootRow = $(tr).closest("table").hasClass("ui-iggrid-root");
if your TR is already a jQuery object, wrapping it in $() is not necessary.
Let me know if you have any questions. Thanks
Angel
Hello Vivian,
No current questions, as I have not been able to verify this as I am focusing on my problem in Support Case: CAS-98782-P8H2Z7 and this forum thread:
http://es.infragistics.com/community/forums/p/72917/370280.aspx.
I have been able to use the Selection feature to obtain on-click events for a row, but have not tested it with child-grid rows yet.
Hello Patrick,
I am just following up and see if you have any questions.
Thank you for the update.
I will be communicating with you through the case regarding the subgrids.
If you have any questions, please let me know as well.