how to set particular item as bold using Dropdownlist

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Jul 2008
Posts: 65
Reputation: Renukavani is an unknown quantity at this point 
Solved Threads: 6
Renukavani Renukavani is offline Offline
Junior Poster in Training

how to set particular item as bold using Dropdownlist

 
0
  #1
Dec 15th, 2008
hi all,
i search in google, i didt get any solu.so raised ? here.if anybody know plz let me know thnks
signOut
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 645
Reputation: binoj_daniel is an unknown quantity at this point 
Solved Threads: 17
binoj_daniel's Avatar
binoj_daniel binoj_daniel is offline Offline
DaniWeb Expert

Re: how to set particular item as bold using Dropdownlist

 
0
  #2
Dec 16th, 2008
try either or the codes below:

dropdown1.Items.FindByValue("0").Attributes.Add("style", "font-weight:bolder")
or

dropdown1.Items.FindByValue("0").Attributes.Add("style", "font-bold:true")

Let me know
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 65
Reputation: Renukavani is an unknown quantity at this point 
Solved Threads: 6
Renukavani Renukavani is offline Offline
Junior Poster in Training

Re: how to set particular item as bold using Dropdownlist

 
0
  #3
Dec 16th, 2008
hi bio\
thnks for reply.i tried this way also before raise my ? here.but its not supporting to DDlist.any more idea plz
signOut
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 104
Reputation: Aneesh_Argent is an unknown quantity at this point 
Solved Threads: 18
Aneesh_Argent Aneesh_Argent is offline Offline
Junior Poster

Re: how to set particular item as bold using Dropdownlist

 
0
  #4
Dec 17th, 2008
  1. <select>
  2. <option>Yes</option>
  3. <option style="background-color: yellow; font-weight:bold;">No</option>
  4. <option>Maybe So</option>
  5. </select>

This will work fine in Firefox but ie does not support it. An alternative will be to use the background-color property to highlight an option rather than making it bold.
Happy Programming
Last edited by peter_budo; Dec 17th, 2008 at 8:09 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC