Click here to Skip to main content
15,892,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

i have an xml file in which suppose it has one data name in this hierarchy

1)car( main item)

a)power

max power
min power

b) speed

max speed
min speed

c)tank capacity

similarly i have another item name cycle. with same hierarchy key

in my gui there are three things one is

combo box and two list box

combo box is bind to main item that is car and cycle , if user select car(combo box) then allfeatres of car should display in listbox simlarly if selct item from this listbox then in another list box max power and min power should display. and if 2nd item of combobox is selected then the previous value in the listbox should be clear and new related value should
appear.

Posted
Updated 17-Nov-13 21:55pm
v3
Comments
♥…ЯҠ…♥ 15-Nov-13 1:14am    
can you post a xml file here, it would help me to make a try...... ;-)
kumar9avinash 15-Nov-13 1:22am    
ok

1 solution

Avinash,

Try adding a tab "\t" before every subsequent child element's content in list box, like:

ListBox.Items.Add("Parent Content")
ListBox.Items.Add("\t Child Content")
ListBox.Items.Add("\t\t Second Child Content")

ListBox.Items.Add("Parent Content2")
ListBox.Items.Add("\t Child Content2")
ListBox.Items.Add("\t\t Second Child Content2")

and so...

it will solve your problem.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900