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
|