Skip navigation
Currently Being Moderated

Tree selected Index

Aug 24, 2006 9:15 PM

I have a tree control using XMLListCollection as the dataprovider. I have a delete button, when clicked should delete the selected tree item.

However, I am unable to get the index of the item selected to call removeItemAt(index). I would greatly appreciate any help.

  • Currently Being Moderated
    Aug 25, 2006 9:59 AM   in reply to opensource_linux
    selectedIndex is the property that keeps track of the index of the selected item in any List-based control. Try:


    Mark as:
  • Currently Being Moderated
    Aug 25, 2006 11:58 AM   in reply to opensource_linux
    Deleting an item causes the indexs to change. Try saving the selectedIndex in a variable, then using that in the removeItemAt() method.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points