Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
5520
select item just after setting itemssource
posted

Hi,

i have a tree. i am setting the itemsSource and i want to select the first item directly.

i tried after setting the itemssource. it's not working. if i add a button that selects the item its working fine.

 tree.SelectItem(tree.Items[0]);

(tree.Items[0] is not null) 

i also tried to go into a loop 

While(tree.SelectedItem == null)

 tree.SelectItem(tree.Items[0]);

 

it 's not working. any suggestions plz

Parents
No Data
Reply
  • 435
    posted

    Hi,

      I was looking at the XamTree in 10.3 and there is no SelectItem method, unless it is something you've extended.  Have you tried using the ActiveItem Property?

      If you could give me more information about what you're trying to do I may be better able to help you.

    Thanks,

    Rich

     

Children