473,396 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

cbo Prob. I have to click an item twice in a combobox to get it to stay.

I have a combobox. Currently with two values. The box is bound to a dataset.
Once the form is loaded and I select the second value, the first\original
value stays in the combobox. If I drop it down again and select the second
value then the second value stays. If I close the form and reopen it the box
works correctly.

Here is the sub that binds of the combobox

Sub LoadTradingPartners()
Dim strSQLTradingPartnerList As String = "Select yadda yadda yadda"

Dim cmdIDList As New SqlClient.SqlCommand(strSQLTradingPartnerList, EDIConn)
SQLDataAdptr.SelectCommand = cmdIDList
dsTP = New DataSet("TPList")
dsTP.Tables.Add("TPIDs")
SQLDataAdptr.Fill(dsTP.Tables("TPIDs"))

cboTP.DataSource = dsTP.Tables.Item("TPIDs")
cboTP.DisplayMember = "TP_NAME"
cboTP.ValueMember = "TP_CODE"

'Bind the data to the controls
cboTP.DataBindings.Add("SelectedValue", dsTP.Tables("TPIDs"), "TP_CODE")
txtFTPInput.DataBindings.Add("TEXT", dsTP.Tables("TPIDs"),
"FTP_DIR_CLAIMS_INPUT")

End Sub
This procedure is called from the Load event of the form.

Thanks,
Phillip
Nov 20 '05 #1
0 990

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

Similar topics

3
by: Wajih-ur-Rehman | last post by:
I am developing a C# app. I want to do something when someone double clicks on a combo box. But this event never fires. Any suggestions? Thanx!
1
by: MadCrazyNewbie | last post by:
Hey Group, How could I do it so if something isn`t listed in my ComboBox (It looks up a Database Coloumn), When a User Double Clicks on the ComboBox it brings up a form so they Can add it in...
6
by: kmercer46 | last post by:
just asking on how to add item data in combobox?? in vb6; combo1.additem "Item 1" combo1.ItemData(combo1.NewIndex) = 1 but how about in .net??
0
by: Hardik Shah | last post by:
Hi, I want to create menu , when my user right click from combo box's list item. I use Contextmenu property of combobox and assign menu for it, but it only effected when combobox's list item not...
2
by: Hardik Shah | last post by:
Hi, I want to create menu , when my user right click from combo box's list item. I use Contextmenu property of combobox and assign menu for it, but it only effected when combobox's list item not...
2
by: Brett Romero | last post by:
After I remove all items from a combobox, the last selected item remains in the display area. I've tried: mycbox.SelectedText = string.Empty; and mycbox.refresh(); How do I clear the...
1
by: Zamael | last post by:
Okay... I've got a web app built in .NET 2.0 and for some reason I have to click a LinkButton twice in order for it to work. What's interesting is that the first URL reads as follows:...
0
by: tarun | last post by:
Hello All, Please find the code for a simple wx.TreeCtrl code. Whenever I right click on any item in the Tree, I see the function, 'OnSelChanged' gets called twice. What I've just done is...
0
by: dvjava | last post by:
Hi, I need to come up with a java program (JList) to monitor products/goods for my operation. The program should let me enter products (items) or delete them, one at a time. Once entered, a...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
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...
0
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
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,...

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.