Hi all,

   I have a challenge....

I am using an ADG in tree mode on a flat array. Everything looks great. One of the requirements is that whenever a user wants to rearrange the order of the rows under a node, I have to store that index value (display order). I.E. The 1st node of the ADG is collapsed. The 2nd node is expanded. The 5th row in the 2nd node gets dragged and dropped to the 3rd row of the same node. The 3rd row then becomes the 4th and the 4th then becomes the 5th. The actual drag and drop functions work beautifully. The problem comes into play when I try to identify the begin index and the end index for the row that was manipulated.

   When I use:

   var beginIndex:int = event.currentTarget.selectedIndex;

it returns the index relative to the entire ADG and not relative to the grouping (node). In the example above, the beginning index value of the 5th row is actually indicated as index = 6 (the 7th row of the ADG which includes the two node rows).

so, short of having to loop thru my array with the node group label and an identifier from the row data, is there another way to determine what row index relative to the node?

Also, how do I identify the endIndex, where the row was dropped? I haven't figured out how to even identify that one and am certain I will have the same problem once I do.

Many thanks in advance for your help!!

Adrian

Reply via email to