Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Data Binding / October 2004

Tip: Looking for answers? Try searching our database.

DataGrid and Combobox problem in WinForms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
prem - 17 Oct 2004 17:31 GMT
Hi Group,

I am having a problem with datagird and combox box.

Say for ex, I am populating datagrid with dataset that contains table
name "Orders". This table contains one column by name "CustomerName".

I am having one more dataset say "Customers" and I populate the combo
box with the Customer information. DisplayMember is "CustomerName" and
ValueMember is "CustomerId".

Now, when I select a row in datagrid, which contains CustomerName as
"Bill", then the selected index in ComboBox control has to be changed
to "Bill".

How to accomplish this.

Note: ComboBox is not part of DataGrid Control
Sijin Joseph - 18 Oct 2004 05:15 GMT
Hi Prem,

It would have been easier if both tables had been in the same dataset.
Then you could have set a DataRelation between them and got the desired
effect very easily.

Take a look at these two threads for more info on this topic.
http://groups.google.com/groups?hl=en&lr=&client=firefox-a&threadm=ehHPSWjmEHA.1
712%40TK2MSFTNGP09.phx.gbl&rnum=2&prev=/groups%3Fq%3Dlookup%2520table%2520.net%2
520sijin%2520joseph%26hl%3Den%26lr%3D%26client%3Dfirefox-a%26sa%3DN%26tab%3Dwg

http://groups.google.com/groups?hl=en&lr=&client=firefox-a&threadm=Ok3cXJ%23nEHA
.536%40TK2MSFTNGP11.phx.gbl&rnum=4&prev=/groups%3Fq%3Dlookup%2520table%2520.net%
2520sijin%2520joseph%26hl%3Den%26lr%3D%26client%3Dfirefox-a%26sa%3DN%26tab%3Dwg


Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph

> Hi Group,
>
[quoted text clipped - 14 lines]
>
> Note: ComboBox is not part of DataGrid Control
Tony Santolaria - 18 Oct 2004 08:13 GMT
Set the property "Text" of the combobox to the Orders - CustomerName column,

> Hi Group,
>
[quoted text clipped - 14 lines]
>
> Note: ComboBox is not part of DataGrid Control

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.