473,652 Members | 2,935 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.DataSo urce = cboxTeam_DS.Tab les["MyTable"];
cboxTeam.Displa yMember = "MyCol2";
cboxTeam.ValueM ember = "MyCol1";

In the _SelectedIndexC hanged, 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 1241
Just a little bump up...

Alex <78********@nul l.com> wrote in
news:Xn******** *************** ********@130.81 .64.196:

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.DataSo urce = cboxTeam_DS.Tab les["MyTable"];
cboxTeam.Displa yMember = "MyCol2";
cboxTeam.ValueM ember = "MyCol1";

In the _SelectedIndexC hanged, 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
2138
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 time to get me to learn this procedure: MY ORIGINAL POST: I am trying to create a database for my small business. I have typed a bunch of information in a table in 5 columns (style, mm, karat, quantity, labor cost). We have different labor...
5
2195
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, all has gone very well with one exception. The table is based on applications made by potential customers looking to buy franchise rights to particular locations and as part of the process they are asked to list their preferred locations 1 to 4....
11
2794
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 (strPubCity) for Publisher City. These two fields have a many-to-one relationship with tables, (tlkpPubName and tlkpPubCity) respectively. The lookup tables only have one field (strPubName and strPubCity), which is their primary key. I also have...
1
1172
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 - all O’K 3. I decide to make some of TB editable so, I remove some of the TB and add Combo boxes (CB) 4. I drag and drop a Table2 (the dropdown choices for the CB) to create DA2 5. I Configure DA2, Generate DS for DA2 using the “Existing...
2
2054
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 (non-.Net) if I wanted to fill a list it may look something like this: -------START CODE <%
4
4611
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 bound to a table as a lookup, drawing values from another table to populate the available selections. This all worked fine in VB6. I have distilled the problem down to a simple form drawing data from the Northwind database for a representative...
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 would like to store both of these fields into two fields on the form. i.e:- Drop down box has "ContName" and "ContLocation"
0
5557
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 ******************************************************** For this teeny job, please refer to: http://feeds.reddit.com/feed/8fu/?o=25
0
1199
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 Column' property for. I've simplified what I'm doing to try and eliminate variables. I've set the 'Row Source' property for the combo to a simple table with no primary key and no relations. I've set the 'Column Count' property to four to...
0
8370
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8283
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8470
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8590
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5620
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4291
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2707
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 we have to send another system
1
1914
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1591
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.