471,337 Members | 1,357 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 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

Jul 21 '05 #1
0 873

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Mike L | last post: by
2 posts views Thread by Jeff Mason | last post: by
2 posts views Thread by Agnes | last post: by
14 posts views Thread by Gary Shell | last post: by
reply views Thread by Fernb2000 | last post: by
5 posts views Thread by Dennis | last post: by
reply views Thread by aine_canby | last post: by
reply views Thread by rosydwin | last post: by

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.