473,471 Members | 1,964 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how to add xml data to listbox?

VB 2005: Using an xml file as the data source, I need to fill a
listbox with data based upon what was selected in a combobox. In
other words, my data consists of a list of customers in a combobox;
once a particular customer is selected I need to populate a listbox
with data specific to the selected customer. A sample layout of the
xml file:
<RECORD>
<CUSTOMER_NUMBER>customer number</CUSTOMER_NUMBER>
<SHIPTO_ID>ship to id</SHIPTO_ID>
<SHIPTO_CITY>ship to state</SHIPTO_CITY>
<SHIPTO_STATE>ship to state</SHIPTO_STATE>
<SHIPTO_ZIPCODE>ship to zipcode</SHIPTO_ZIPCODE>
</RECORD>

I'm sure this would be easier if <CUSTOMER_NUMBERwere the parent
element rather than <RECORDbut the software that produces the xml
report isn't really modifiable as far as the structure of the xml
file.

So to recap: the form loads, populates the combobox with the customer
number data from each record, the user chooses a particular customer
number, then the program needs to populate a listbox with the ship-to
id data related to that particular customer. There can and will be
multiple records which have the same customer number but different
ship-to id's.

I've got the combobox populating with the customer numbers okay but
I'm stuck trying to figure out the next step.

May 6 '07 #1
1 1708
spowel4 <sp*****@gmail.comwrote in news:1178454510.527521.56160
@p77g2000hsh.googlegroups.com:
>
So to recap: the form loads, populates the combobox with the customer
number data from each record, the user chooses a particular customer
number, then the program needs to populate a listbox with the ship-to
id data related to that particular customer. There can and will be
multiple records which have the same customer number but different
ship-to id's.

I've got the combobox populating with the customer numbers okay but
I'm stuck trying to figure out the next step.
I would deserialize the XML into a .NET object collection. Then bind the
form to the collection of records. From there, it's just standard .NET code
..
May 6 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: me | last post by:
I've included a picture below to show what I am trying to accomplish. It is best to copy/paste into notepad to get the spacing correct. I have a dataset that contains 3 tables. Two of the tables...
3
by: Uma sakshi | last post by:
Hi I have one VB.NET application,in that application i have one datagrid control.The datagrid control contains somedata.I want to copy the data in a particular cell and paste it into my C#.NET...
0
by: | last post by:
Greets All, Question on data in datagrid /listbox and looping? I’m trying to decide the best way to write this code. 1 would like the user to make several selections from one listbox/combo box...
0
by: | last post by:
Greets All, Question on data in datagrid /listbox and looping? I’m trying to decide the best way to write this code. 1 would like the user to make several selections from one listbox/combo box...
1
by: Spock | last post by:
Hi. I have a form with a listbox and a few label fields all bound to a dataset. When i navigate the listbox the labels change accordingly. so far everything works good. I made a button to...
1
by: A. Spiehler | last post by:
I'm trying to fill a listBox control with string members from an array of objects. I think using data binding is supposed to be the easiest way to do this. I've never used data binding before and...
2
by: DartmanX | last post by:
I have a form that does the following: - User inputs a serial number - VBA code does a lookup (SQL Query) and populates a listbox with results (4 columns in the Listbox) - Start Over (Listbox...
4
by: CrimeMaster | last post by:
HI I have an Exe file when it runs ,there are just two controls on the window.One is a ListBox and another is a Multi line Rich Edit control.When i click on an item in the list some text is...
1
by: anjupt | last post by:
Hi, I have 2 listboxes with data fetched from database so for both the listboxes datasource is set .i tried to move data from one listbox to another listbox but Error"An unhandled exception of...
15
by: Doogie | last post by:
I have a .net app that a user currently enters a number in a text box, hits a button and a data call is executed. She wants the ability to enter in multiple numbers (up to 100). So to make...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.