PC Review


Reply
Thread Tools Rate Thread

Combo Box in Grid using two related tables. Displaymember from T1 but ValueMember from T2

 
 
gudia
Guest
Posts: n/a
 
      18th May 2004
Two tables: Accounts and Companies

Accounts (AcctID, AcctNmbr, AcctName, CompID) -- AcctID is PK and
CompID is Foreign Key from Companies.
Companies (CompID, CompName) -- CompID is PK.

Created a DataSet AcctDS with two Data Tables, Acct and Comp

Created a grid and I want to show the following in the Grid:

AcctNmbr AcctName Company

where Company is a ComboBox, whose values will be derived from the
Companies table. I only want to show CompName in the combo box.
DisplayMember is CompName from Comp Data Table and ValueMember is
CompID from Acct Data Table. So, a user can pick CompName from the
drop down combo box, but the actual value will be stored as CompID in
the Accounts table.

Please reply
 
Reply With Quote
 
 
 
 
Cor Ligthert
Guest
Posts: n/a
 
      19th May 2004
Hi Gudia,

Because you send this to the language.csharp group and the language.VB group
will you tell us first in what relation you want to use it?

Because of this I get the idea that your question is not language related.

Cor


 
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
valuemember and displaymember for a combobox Sam Microsoft VB .NET 2 19th Apr 2005 12:31 PM
proposedValue contains displayMember instead of valueMember =?Utf-8?B?TWFya3VzIEhpbGY=?= Microsoft VB .NET 1 31st Mar 2005 11:05 AM
Combo Box in Grid using two related tables. Displaymember from T1 but ValueMember from T2 gudia Microsoft C# .NET 1 19th May 2004 07:27 AM
DisplayMember / ValueMember Question James Microsoft Dot NET Compact Framework 1 28th Feb 2004 09:17 AM
Combo Box Displaymember, Valuemember Dianna K Microsoft Dot NET 0 2nd Dec 2003 10:44 PM


Features
 

Advertising
 

Newsgroups
 


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