Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
.NET 4.5.1 and Visual Studio 2013 General Discussions For discussing anything about .NET 4.5.1, WPF, WCF, the rest of the .NET 4.5.1 Framework, and Visual Studio 2013 that isn't about a specific Wrox book. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET 4.5.1 and Visual Studio 2013 General Discussions section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 6th, 2015, 05:09 PM
Authorized User
Points: 50, Level: 1
Points: 50, Level: 1 Points: 50, Level: 1 Points: 50, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2012
Location: Texas!!
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to use Combobox values

I have a combobox with a particular value from a SQL query.

Say,

Code:
SELECT id_owner, folder_name FROM owner WHERE owner_type='PLANTS' ORDER BY folder_name

// and then

 while (dr.Read())
  {
     cboBox.Items.Add(dr[1].ToString());    
  }
Well I only want the combo box to show the folder_name but once one selects from the list it then knows which id_owner to select.

That is dr([1].ToString() but not show it.

Does the combobox have a hidden index field or what?

How does the combobox keep the dr[0].ToString as well as the dr[1].ToString for use?

Thanks,

Deaf
Reply With Quote
Reply


Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get value of combobox during Combobox index change in server side harinarayananvp Beginning VB 6 0 October 21st, 2011 01:14 PM
vb 5005, checkbox values into combobox Un33k Visual Basic 2005 Basics 0 June 16th, 2007 12:29 AM
Filling Combobox with value from other Combobox ayazhoda Access VBA 6 June 5th, 2007 04:58 AM
list of values from postgresql to combobox zamir4eva Beginning PHP 1 January 3rd, 2007 10:29 PM
Getting Combobox values from a mySQL database NEO1976 PHP Databases 3 December 11th, 2006 04:34 PM



All times are GMT -4. The time now is 07:24 AM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.