Skip to main content

Select a treeview

  • June 16, 2016
  • 2 replies
  • 0 views

Alberto Ferraz

Hello,

I made my first program with a TreeView and is working.
I used the method that is in the example WPFBOOK the demo.

Now the question I am asking is how do I get the selected line?
For example I have a locale with five clients. What I want is to click on a client and display your data in another window.

Thank you

Alberto Ferraz

2 replies

Chris Glazier
Forum|alt.badge.img+2

Hello,

I made my first program with a TreeView and is working.
I used the method that is in the example WPFBOOK the demo.

Now the question I am asking is how do I get the selected line?
For example I have a locale with five clients. What I want is to click on a client and display your data in another window.

Thank you

Alberto Ferraz

How you return the value selected depends on whether or not you are using binding but a real simple example is using the SelectedItemChanged event.

method-id treeView1_SelectedItemChanged.
procedure division using by value sender as object e as type System.Windows.RoutedPropertyChangedEventArgs[type System.Object].

          declare myselection = treeView1::SelectedItem


Alberto Ferraz
  • Author
  • Participating Frequently
  • June 27, 2016

Hello,

I made my first program with a TreeView and is working.
I used the method that is in the example WPFBOOK the demo.

Now the question I am asking is how do I get the selected line?
For example I have a locale with five clients. What I want is to click on a client and display your data in another window.

Thank you

Alberto Ferraz

Thanks again for your help.

Best regards

Alberto Ferraz