PC Review


Reply
Thread Tools Rate Thread

Bound lists and such.... ??? Help...

 
 
anthonyn
Guest
Posts: n/a
 
      10th Jul 2003
For example: Say I have two tables... One where I want to write to, the
other where I want my possible values to come from...

Such as a combo box bound to a table that has my values, when the user
selects the item, rather then copy the text value to a field bound to my
destination table, can't I do it all with the one combo box? Basically the
control would both provide the user with a list of values and write the
chosen one to the db...

Thanks in advance...

Anthony Nystrom


 
Reply With Quote
 
 
 
 
Stephen Muecke
Guest
Posts: n/a
 
      10th Jul 2003
Anthonyn

Set the ComboBox.DataSource to one DataTable and bind the SelectedItem to a
column of the other DataTable

myCombo.DataSource = firstTable
myCombo.DataBindings.Add("SelectedItem", secondTable, "ColumnName")

Stephen

"anthonyn" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> For example: Say I have two tables... One where I want to write to, the
> other where I want my possible values to come from...
>
> Such as a combo box bound to a table that has my values, when the user
> selects the item, rather then copy the text value to a field bound to my
> destination table, can't I do it all with the one combo box? Basically the
> control would both provide the user with a list of values and write the
> chosen one to the db...
>
> Thanks in advance...
>
> Anthony Nystrom
>
>



 
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
Using Bound Drop Down Lists in FormView TheDude5B Microsoft ASP .NET 1 18th Dec 2006 03:52 PM
Adding rows to a bound table that is bound to DataGridView(DataSou =?Utf-8?B?S2V2aW4gQnVydG9u?= Microsoft Dot NET Framework Forms 2 22nd Jun 2006 06:05 AM
Oracle Parameter bound problem: ORA-01008: not all variables bound =?Utf-8?B?Zmlq?= Microsoft ADO .NET 1 24th Dec 2004 08:31 AM
Re: PropertyManager.EndCurrentEdit() marks the bound dataview row as Modified even if the data in the bound control is unchanged Miha Markic [MVP C#] Microsoft ADO .NET 0 5th Jun 2004 11:19 PM
Size Limits of Distribution Lists & How to use existing lists as sources from which to create other lists =?Utf-8?B?aGFiYWRhaTE=?= Microsoft Outlook Discussion 1 27th Apr 2004 04:15 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:41 AM.