473,503 Members | 1,629 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help accessing other columns from DataSource table in a drop down combo box?


Hi all,

I'm trying to get this example working with csharp in a winforms app...
I'm creating a datasource and putting in a table that has 10 columns:

cboxTeam.DataSource = cboxTeam_DS.Tables["MyTable"];
cboxTeam.DisplayMember = "MyCol2";
cboxTeam.ValueMember = "MyCol1";

In the _SelectedIndexChanged, how do I get the values of MyTable.MyCol3 for
the currently selected row in the combobox? Or even the whole row for
MyTable?

Do I have to databind it and use a currencymanager? Since I'm mapping the
whole table to the cbox, it seems like I should be able to access the other
members from there...???

Thanks!
May 23 '06 #1
1 1231
Just a little bump up...

Alex <78********@null.com> wrote in
news:Xn*******************************@130.81.64.1 96:

Hi all,

I'm trying to get this example working with csharp in a winforms
app... I'm creating a datasource and putting in a table that has 10
columns:

cboxTeam.DataSource = cboxTeam_DS.Tables["MyTable"];
cboxTeam.DisplayMember = "MyCol2";
cboxTeam.ValueMember = "MyCol1";

In the _SelectedIndexChanged, how do I get the values of
MyTable.MyCol3 for the currently selected row in the combobox? Or
even the whole row for MyTable?

Do I have to databind it and use a currencymanager? Since I'm mapping
the whole table to the cbox, it seems like I should be able to access
the other members from there...???

Thanks!


May 24 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2135
by: Rated R1 | last post by:
I wrote this before in the NGs, so I am going to paste the responses that I got and see if someone can please help me. Email me and we can set something up as Id even be willing to pay for your...
5
2187
by: Steve Patrick | last post by:
Hi All You guys are my last hope, despite spending money on books and hours reading them I still can not achieve the results I need. I have designed a database in Access 2000 based on 1 table,...
11
2778
by: my-wings | last post by:
I think I've painted myself into a corner, and I'm hoping someone can help me out. I have a table of books (tblBooks), which includes a field (strPubName) for Publisher Name and another field...
1
1164
by: Steve B. | last post by:
Using VS 2003 1. I Connect to a MS-Access dB, create a DataAdapter (DA1) for Table1 and a DateSet (DS) with Table1 2. I populate a Datagrid and associated Textboxes (TB -Text) w/ the DS.DA1 -...
2
2041
by: Daniel | last post by:
I'm new to .Net and all of its abilities so I hope this makes sense. Basically I'm confused on when is the appropriate time to use web forms controls vs. regular HTML. For example in ASP...
4
4602
by: jon f kaminsky | last post by:
Hi- I've seen this problem discussed a jillion times but I cannot seem to implement any advice that makes it work. I am porting a large project from VB6 to .NET. The issue is using the combo box...
1
338
by: John Taylor | last post by:
I think this is easy for a guru but I've been bashing my head for hours. I have a drop down box in a form that looks up details from a table. There are two fields in the drop down box and I...
0
5518
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
0
1186
by: Gord | last post by:
I must be missing something obvious, but I can't get my combo box to work properly as I understand that it should. I've got a multiple column drop down list that it seems I can't set the 'Bound...
0
7316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6976
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5566
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1495
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
729
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
372
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.