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.
Hello Vivian,
I've taken the suggestion that you stated, and have begun using the Selection feature and rowSelectionChanged event to handle what row is selected. Unfortunately, I have not been able to get the subgrids working. I've submitted a support ticket as well as posted in this thread:
http://ko.infragistics.com/community/forums/t/72917.aspx
Hello Patrick,
Please let me know if you have further questions.
In addition, if the currently selected row is not in the children's selected rows, it is a Parent row.
I hope this helps.
If you have any questions, please let me know as well.
On each click on a row or cell of an igHierarchicalGrid, a corresponding event is triggered. For the row, we have the rowSelectionChanging / rowSelectionChanged event. The Selected rows will be available at this event. We may distinguish a child's selected row and the parent's selected row as the following forum thread suggested:
http://ko.infragistics.com/community/forums/t/71232.aspx
Please let me know if this is a feasible option, or otherwise.
Thank you for contacting Infragistics!
I am currently reviewing the details of your request.
I will be updating you by tomorrow with more information, or with further questions for you.
If you have any questions, please let us know as well.