treeSlsHrchy.selectedItems.push( xmllistDescendants[i]); puts nothing in the selectedItems array i.e. nodes are opened but nothing selected. Modified the original example with this and it behaves the same. So the extra xml I added
<element eid="graham" id="6"/> replacing <element eid="graham"/> is doing something I do not understand. Would it be OK to post the code here? TIA, Mic. --- In flexcoders@yahoogroups.com, "Mic" <chigwel...@...> wrote: > > Thanks Tracy, as always much appreciated. > > --- In flexcoders@yahoogroups.com, "Tracy Spratt" <tracy@> wrote: > > > > Perhaps you should set the selectedItems array instead. > > > > treeSlsHrchy.selectedItems.push( xmllistDescendants[i]); > > > > > > > > Tracy Spratt, > > > > Lariat Services, development services available > > > > _____ > > > > From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On > > Behalf Of Mic > > Sent: Monday, May 11, 2009 10:17 PM > > To: flexcoders@yahoogroups.com > > Subject: [flexcoders] Tracy's search tree solution question ... > > > > > > > > > > > > > > > > > > http://www.cflex. <http://www.cflex.net/showFileDetails.cfm?ObjectID=554> > > net/showFileDetails.cfm?ObjectID=554 > > > > I got the example to work perfectly, but in my code where the xml is more > > complex, it only selects/highlights the last match. allowMultipleSelection = > > "true" but when I step through I can see that the array tree.selectedItems > > only holds the last > > > > treeSlsHrchy.selectedItem = xmllistDescendants[i]; > > > > which overwrites the previous entry i.e. the array is always a single row. > > In the example debug I can see the selectedItem array build up line by line > > as the loop loops. So I went back to the example and altered the xml from > > > > <element eid="graham"/> > > <element eid="weldon"> > > > > to > > > > <element eid="graham" id="6"/> > > <element eid="weldon" id="7"> > > > > and the example now only highlights/selects the last match i.e. the > > selectedItems array refuses to hold more than a single row. Why does the > > extra xml do this? Inquiring minds etc :-) TIA, > > > > Mic. > > >