I have a tree that functions as a menu for other controls in
my app. When the user clicks on a tree leaf, an xml load event is
called, using the xmlFileName in the tree's dataProvider. All works
When the app first opens, I want to load specific xml, based
on other variables. I can identify the index in the tree's
dataProvider that I need, and I can set the tree's selectedIndex to
that location. However, I can't seem to set the tree's selectedItem
to that location -- I get the following error:
Cannot access property or method of a null object.
The null object is the selectedItem of the tree (see code).
How do I set the selectedItem in a tree from code, rather
than from a user click event?