473,409 Members | 2,022 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,409 software developers and data experts.

Combo box , text box and databinding

Hello I have a dataset is composed of a table that has a Name and Id
colums. I would like to fill the combo box with the List of names from

the dataset and I would like the text box to be the id of the Name that

was just selected in the combo box. I have tried many things with no
success. I have this so far
' Set up the Combobox bindings
cboUsers.DataSource = ds.Tables(0)
cboUsers.DisplayMember = "Names"
cboUsers.ValueMember = "Id"
cboUsers.DataBindings.Add("SelectedValue", ds.Tables(0), "Names")
txtPassword.DataBindings.Add("Text", ds.Tables(0), "Id")
It populates the combo box and works but after selecting items in the
combo box I get 'System.StackOverflowException'
One more question I have a control Tab with a number of tabs. On what
action would I place this previous code so it only executes once when
the select tab is selected. I have tried controlTab click but it
executes the previous code everytime this tab is clicked instead of
just once when it becomes on focus
Thanks in advance
Fernb2000

Nov 22 '05 #1
0 694

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

Similar topics

0
by: CGuy | last post by:
URGENT HELP REQUIRED FROM GURUS Hi, I have a custom object that implements ICollection and IListSource. This object has also an enumerator defined for it which implements IEnumerator and...
0
by: Fernb2000 | last post by:
Hello I have a dataset is composed of a table that has a Name and Id colums. I would like to fill the combo box with the List of names from the dataset and I would like the text box to be the id...
1
by: ZZZ | last post by:
I have several combo's with databinding values. when a user starts typen, it's autocompleting so far so good but i don't want the user to have the ability to type a values that's not in the...
10
by: Mike L | last post by:
This is for a Win form. Currently, the first record is shown in the combo box. I want the combo box to be blank and when the user clicks on the down arrow to choose from the list and clicks on...
2
by: Jeff Mason | last post by:
I'm observing some strange behavior when I use a bound combo box in conjunction with the combo's anchor property. I define a form which contains just a textbox and a combo box. The text box is...
2
by: Agnes | last post by:
My combo Box 's datasource is the table without databinding. Now , i need to set some value , I try Me.cboUnit.Text = drInvoice.item("unit") , HOWEVER, it didn't work . I can't assign to that...
14
by: Gary Shell | last post by:
I have five comboboxes each has a item listed populated by hand in the IDE. Each has the text property bound to a text field in the database. When I initially fill the dataset and display the page...
18
by: Vayse | last post by:
Has anyone an example of filling a combo box with a data reader? Thanks Vayse
5
by: Dennis | last post by:
I am trying to create a form using databinding to a dataset and one of the fields requires the user to select from a list of optons. Any hints on how to do this other than bind the field to a...
0
by: aine_canby | last post by:
Hi, I'm trying to master databinding but I feel like I'm doing it all wrong. I have a combo which allows me to select a test. I also have the ability to add a test which should result in its...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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,...
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...

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.