PC Review


Reply
Thread Tools Rate Thread

Combo box , text box and databinding

 
 
Fernb2000
Guest
Posts: n/a
 
      19th Feb 2005
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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Which databinding should i use for a combo box Claire Microsoft C# .NET 0 30th Jan 2008 02:51 PM
DataBinding to a combo box. Sharat Koya Microsoft ADO .NET 3 21st Feb 2005 08:55 PM
RE: combo box databinding =?Utf-8?B?ZWxiaXJybw==?= Microsoft ADO .NET 0 24th Sep 2004 07:33 PM
Re: combo box databinding GrantMagic Microsoft ADO .NET 1 21st Sep 2004 02:59 PM
combo box databinding =?Utf-8?B?RWR3YXJk?= Microsoft ADO .NET 0 21st Sep 2004 02:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:51 PM.