Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > .NET Framework 2.0
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 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 Search this Thread Display Modes
  #1 (permalink)  
Old December 27th, 2007, 12:41 AM
Registered User
 
Join Date: Nov 2007
Location: Lahore, Punjab, Pakistan.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to shehryar
Default Combo with multiple Display fields in ASP.Net

How can a combo box be used having multiple display fields when Dataset is used as its data source?

Shehryar Tariq
Reply With Quote
  #2 (permalink)  
Old January 8th, 2008, 06:46 AM
samjudson's Avatar
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

You can't as far as I am aware. You can add a calculated column to a datatable which could then be used perhaps?

/- Sam Judson : Wrox Technical Editor -/
Reply With Quote
  #3 (permalink)  
Old January 8th, 2008, 02:13 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Sam is correct. An ASP.NET DropDownList (there is not native combo box) is emitted and rendered as a standard HTML <select> element. This only allow a single string for it's value and display text. There are numerous 3rd party controls that provide combo box-like behavior for web apps however. You can also use the "poor-mans" approach and set your DDL to use a fixed width font and space delimit mutiple values so they appear tabular.

-Peter
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Combo box to display items from parent combo box Gini Visual Studio 2008 0 June 18th, 2008 12:30 AM
Tooltip text setting for a combo in ASP.Net is req shehryar .NET Framework 2.0 1 January 8th, 2008 06:45 AM
To fetch selected fields in reports in asp.net 1.1 SanNil ASP.NET 1.0 and 1.1 Professional 0 February 27th, 2007 04:29 AM
Updating multiple Rows from multiple fields in ASP vdm_nana SQL Server ASP 0 April 1st, 2004 04:26 AM



All times are GMT -4. The time now is 04:52 PM.


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