Skip to main content

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

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


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