This is a migrated thread and some comments may be shown as answers.

How to extract XMLElement of selectedItem of ListBox in WPF?

1 Answer 102 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Shanmuga
Top achievements
Rank 1
Shanmuga asked on 04 Apr 2015, 10:26 PM

Problem Background:
In my WPF application, in one of the window/page contains 3 List Boxes and 1 ComboBox. These 3 ListBoxes are binded with XML dataprovider and there is no issues. I mean when 1st listbox selection changes automatically updates listbox2. In the same way, listbox3 updates as listbox2 changes. These are all worked out in XAMl file alone and there is code-behind except InitializeComponent() and few lines of code for loading this XAML file dynamically using XAMLReader(this is my requirement)

Problem facing Requirement:OnSelection change event of any of the ListBox, need to populate ComboBox data dynamically( it will fire webservices which is based on above mentioned 3 LisBox selection). For this purpose, in SelectionChange I am trying to get

ListBoxObj.SelectedItem - Always contains XML tree.(i.e) of type XMLElement

I have tried all possiblities, everywhere I am getting only XML tree.
Anyone have any idea, how to extract ListBox selected Item Text from XMLElement?
Thanks

1 Answer, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 08 Apr 2015, 03:00 PM
Hi Shanmuga,

We are not exactly sure that we completely understand your scenario. Could you please provide us some more detailed information? Sending us a code-snippet of how exactly the controls are connected with the XML DataProvider will be of great help for us in order to provide you with a prompt solution if possible.

We are looking forward to hearing from you.

Regards,
Nasko
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
ListBox
Asked by
Shanmuga
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Share this question
or