Can we have a click event on the parent to expand the child elements while using nestedRows instead of +/- ?
there’s no event for this yet. You’d need to check if
ht_nestingButton element has a second class of
ht_nestingCollapse to check if it is collapsed or expanded.
Thanks @aleksandra_budnik for your reply. I will try to work around this.
I was able to change the class from ht_nestingExpand to ht_nestingCollapse and viceversa on the div. Is there any extra step that I need to perform to collapse the rows? The event is on a td at this moment.
Thanks @aleksandra_budnik. With trimRows, is there a way in which we can find the indexes of the child rows associated to the parent?
You can use
afterGetRowHeader method to check if cell is a parent or a child here is an example https://jsfiddle.net/AMBudnik/xn5rqhca/
Thank you @aleksandra_budnik. I have updated the fiddle. instead of col, it should be row. Small Change.
@aleksandra_budnik : afterGetRowHeader gives me the list of rows and I am able to differentiate between the child and parent.
I have 1 question here -
You can use the
afterSelectionEnd hook with
Hi @aleksandra_budnik : I was able to work around and have a click event on the parent to collapse and expand the child elements. I will share the fiddle with you soon. Thanks for your help.
Sure. Please take your time.
I guess that we can close the topic as it’s more than a month now but if there’s anything to add here please open a new topic.