473,664 Members | 2,773 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How set datasource of combobox to xml file

I have an XML file.

In VB.NET 2005 is there any easy way to set the datasource of the combobox
to this xml file without using code?

Thanks!
Jan 9 '06 #1
3 6134
hi,
you can do this by using DataSet's "ReadXml" Property. what you need
to do is create a compitible XML file for DataSet. i assumed that your
XML file is compitible to get load in DataSet.

use your DataSet object assigned to ComboBox to load the XML file by
passing the filename to it's Property "ReadXml".

i hope this helps.

Lucky

Jan 9 '06 #2
hi,
you can do this by using DataSet's "ReadXml" Property. what you need
to do is create a compitible XML file for DataSet. i assumed that your
XML file is compitible to get load in DataSet.

use your DataSet object assigned to ComboBox to load the XML file by
passing the filename to it's Property "ReadXml".

i hope this helps.

Lucky

Jan 9 '06 #3
Thanks. I'll give it a try....

"Lucky" <tu************ @gmail.com> wrote in message
news:11******** **************@ g47g2000cwa.goo glegroups.com.. .
hi,
you can do this by using DataSet's "ReadXml" Property. what you need
to do is create a compitible XML file for DataSet. i assumed that your
XML file is compitible to get load in DataSet.

use your DataSet object assigned to ComboBox to load the XML file by
passing the filename to it's Property "ReadXml".

i hope this helps.

Lucky

Jan 9 '06 #4

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

Similar topics

3
12092
by: Tamir Khason | last post by:
Why this does not work??? cb1 - combobox DataProvider.DataProvider.DS_BringRacks() - DataSet cb1.DataSource=DataProvider.DataProvider.DS_BringRacks().Tables; cb1.DisplayMember = "id"; cb1.ValueMember = cb1.DisplayMember;
4
22217
by: kids_pro | last post by:
Hi, On form_load() I bind a combobox to a dataset and listbox to a datatable. When I want to unbind it I call comboBox1.DataSource = null, listBox1.DataSource = null It unbind but the Items still persist in the comboBox and listBox. I expect it to be empty list. Can anyone tell me how to unbind the comboBox and automatically clear it
2
1796
by: jobi | last post by:
Hi, I have this combobox which has a table from a dataset as datasource. When I click an item on the combobox-list , I would like to display (in textfield) the value from an other column that is present in the table but is not the ID-column that is connected to toe combobox.datavalue. How can I do this ?
2
1887
by: Bob | last post by:
I have an ArryList that I'm using as a datasource for a combobox. As an item is selected in the combobox and processed I'd like to remove it from the combobox. When I try I get an error stating that the arraylist is being used as a datasource and can't be updated. I can't remove it as the datasource for the combobox so I can update it and reassign it back as the datasource. Anyone got a workaround?
1
1410
by: Bob | last post by:
I have an arraylist (arlNAMES) that is bing used as a datasource for a combobox. When an item is selected in the combobox I want to remove it from both the combobox and the arraylist. This doesn't work. DOes anyone know why and how to fix it? Dim intPOS As Integer = cboAdvanceResponse.SelectedIndex cboAdvanceResponse.DataSource = Nothing arlNAMES.RemoveAt(intPOS) arlnames.TrimToSize arlREF.RemoveAt(intPOS)
2
1198
by: Richard | last post by:
I have a form with tabpages on them. On one tabpage I have three comboboxes all of which derive their datasource from the same table:- TimePeriodID TimePeriod 1. Day(s) 2. Week(s) 3. Month(s) 4. Year(s)
4
10117
by: SHEBERT | last post by:
Here is an example of a SortedList that works as a datasource to the ComboBox and a generic SortedList<that does not works as a datasource to the ComboBox. Why? If I use List and generic List<>, both works. private void Form1_Load(object sender, EventArgs e) { System.Collections.SortedList QA1 = new System.Collections.SortedList();
1
18104
by: MrNobody | last post by:
I have a ComboBox on my form, and I set it's DataSource to an ArrayList of custom objects. Everything loads fine, all the entries I initially loaded into the ArrayList appear in my ComboBox. However, while my program is running and I add a new object to that ArrayList - this ComboBox is not updating to reflect the change. I have gone so far as to try: clientList.Invalidate();
1
1743
by: progressdll | last post by:
I'm trying to change the behaviour of setting the DataSource property of combobox. Here is the behaviour I now see. Setting the DataSource property of combobox to an ArrayList will visual display the first value in the Text field of the combobox. ( or setting the Text property ).
2
15584
by: samueltilden | last post by:
This problem should be simple. I am using Visual Studio 2003, Version 1.1 I am writing a desktop application in which I am binding a DataTable to the DataSource of a ComboBox. // I have 50 rows (concerning states) in dataTable.Rows;
0
8438
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8348
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8863
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8636
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7376
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6187
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5660
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4356
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2004
muto222
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.