Linking 4 List Boxes

RosstheBoss

New Member
First off im very new to C# im trying to recreate a application i created in Java.I have 4 Listboxes. Each box will hold a list of values from the xml file.listBox_year for the \[code\]<Year>\[/code\].listBox_make for the \[code\]<Make>\[/code\].listBox_model for the \[code\]<Model>\[/code\].listBox_subModel is for the \[code\]<sub-Model>\[/code\].So lets say i add all the years to the listBox_year with no duplicate years. Say i click on a year it will bring up all the Make of cars that have that year. Then i click on the Make and it will bring up the models for that Make thats under that Year etc...with Java i was able to use a HashMap to make this work to where i can have multiple keys of the same name and i can search for what ever key in this case year is selected grab all the Makes or Values that has that year as a key.Here is the XML format\[code\]<?xml version="1.0" encoding="utf-8" ?><vehicles> <Manufacturer> <Make>Subaru</Make> <Year>2010</Year> <Model>Impreza</Model> <Sub-Model>2.0i</Sub-Model> <Highway>36 MPG highway</Highway> <City>27 MPG city</City> <Price>$17,495</Price> <Description> Symmetrical All-Wheel Drive. SUBARU BOXER? engine. Seven airbags standard. >Vehicle Dynamics Control (VDC). </Description> </Manufacturer> <Manufacturer> <Make>Toyota</Make> <Year>2012</Year> <Model>Supra</Model> <Sub-Model>TT</Sub-Model> <Highway>22 MPG highway</Highway> <City>19 MPG city</City> <Price>$48,795</Price> <Description> 16-inch aluminum-alloy wheels. 6-speaker audio system w/iPod? control. Bluetooth? hands-free phone and audio. Available power moonroof. </Description> </Manufacturer> <Manufacturer> <Make>Subaru</Make> <Year>2011</Year> <Model>Impreza</Model> <Sub-Model>2.0i Limited</Sub-Model> <Highway>36 MPG highway</Highway> <City>27 MPG city</City> <Price>$18,795</Price> <Description> 16-inch aluminum-alloy wheels. 6-speaker audio system w/iPod? control. Bluetooth? hands-free phone and audio. Available power moonroof. </Description> </Manufacturer> <Manufacturer> <Make>Subaru</Make> <Year>2011</Year> <Model>Impreza</Model> <Sub-Model>2.0i Limited</Sub-Model> <Highway>36 MPG highway</Highway> <City>27 MPG city</City> <Price>$18,795</Price> <Description> 16-inch aluminum-alloy wheels. 6-speaker audio system w/iPod? control. Bluetooth? hands-free phone and audio. Available power moonroof. </Description> </Manufacturer></vehicles>\[/code\]
 
Back
Top