Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > drop down list

Reply
Thread Tools

drop down list

 
 
chris
Guest
Posts: n/a
 
      06-15-2004
I've searched postings, etc. need help on dropdownlist. Can you make the item name equal to more than one data field. I.e. in the example below I'd liek to make the viewable text USER_FNAME USER_LNAME. I've tried to add like:
ddusernames.DataTextField = ( "USER_FNAME" ) & " " & ( "USER_LNAME" )
and I've tried:
ddusernames.DataTextField = ( "USER_FNAME" )("USER_LNAME" )

Suggestions?

'create user drop-down list
ddusernames.datasource = userlist
ddusernames.DataTextField = ( "USER_FNAME" )
ddusernames.DataValueField = ( "USER_EMAIL" )
ddusernames.DataBind()

thanx!
 
Reply With Quote
 
 
 
 
Alvin Bruney [MVP]
Guest
Posts: n/a
 
      06-16-2004
no you have to manually loop thru the dataset and concat the results into
the listitem and add it into the dropdown. would be a good feature though. i
see more and more people asking for that ability

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"chris" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I've searched postings, etc. need help on dropdownlist. Can you make the
> item name equal to more than one data field. I.e. in the example below I'd
> liek to make the viewable text USER_FNAME USER_LNAME. I've tried to add
> like:
> ddusernames.DataTextField = ( "USER_FNAME" ) & " " & ( "USER_LNAME" )
> and I've tried:
> ddusernames.DataTextField = ( "USER_FNAME" )("USER_LNAME" )
>
> Suggestions?
>
> 'create user drop-down list
> ddusernames.datasource = userlist
> ddusernames.DataTextField = ( "USER_FNAME" )
> ddusernames.DataValueField = ( "USER_EMAIL" )
> ddusernames.DataBind()
>
> thanx!



 
Reply With Quote
 
 
 
Reply

Thread Tools

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Affecting a dynamically created drop down from another dynamically created drop down. msimmons ASP .Net 0 07-16-2009 03:17 PM
retrive preselected value in second drop down list from the first drop down list weiwei ASP .Net 0 01-05-2007 07:29 PM
Multiple select drop down poplulating sub drop down scott@dettcom.com Javascript 3 11-09-2006 07:50 PM
Auto Drop down a Drop Down List xxbmichae1@supergambler.com Javascript 5 11-23-2005 01:35 AM
New to .NET, can I have one drop down box control the data of another drop down box using a database? SirPoonga ASP .Net 2 01-07-2005 10:44 PM



Advertisments