Team,
I have a need to be able to read text from an array of selected children (supposedly available using the 'children' method). Is there any way to access this array to do this?
Thanks,
Walter Sobchak
To clarify, this needs to be children of a selected node. I seem to be able to access the checked status by using nodeByIndex but cannot access the data.Text or html properties to read the inner text of the nodes.
To Update the above, I've found the "children" method of selecting by a node as parameter does not seem to work. I've resorted to using"childrenByPath" which has the desired result of accessing the set of children for manipulation.
Could someone from the IG team clarify why the children method may have problems and the childrenByPath doesn't?
Hello Big_Lebowski,
Thank you for contacting Infragistics community.
As far as I understood your explanation, you want to get the text of any selected node's child node. Is that right?
If this is the case, then I would suggest you to do that on selectionChanged event, for instance:
selectionChanged: function (evt, ui) {
// this will return "United States" as result based on the following sample code - http://igniteui.com/tree/overview var childNodeText = ui.selectedNodes[0].element[0].children[2].children[0].children[0].innerHTML; }
I'm attaching also a sample for your reference. Please let me know if you have any further questions.
Sincerely,
Tsanna