473,395 Members | 1,497 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Drop Down List with items of different color.

UJ
Is there a way to have items in a drop down list where certain items are a
different color?

How about having items that are strikethrough?

TIA - Jeff.
Feb 5 '07 #1
3 2836
If what you want is like : http://asp.net.do/test/dropdowncolor.aspx

....all you need to do is add :

<option style="color: blue;">One</option>

....to your options.

Here's a handy list of HTML color names :
http://www.w3schools.com/html/html_colornames.asp


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================

"UJ" <fr**@nowhere.comwrote in message news:uS**************@TK2MSFTNGP03.phx.gbl...
Is there a way to have items in a drop down list where certain items are a different color?

How about having items that are strikethrough?

TIA - Jeff.


Feb 5 '07 #2
UJ
Thanks. But I'm binding a table to the items. Even if I do it row by row,
how can I set the options for the items that I add?

"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:uw**************@TK2MSFTNGP05.phx.gbl...
If what you want is like : http://asp.net.do/test/dropdowncolor.aspx

...all you need to do is add :

<option style="color: blue;">One</option>

...to your options.

Here's a handy list of HTML color names :
http://www.w3schools.com/html/html_colornames.asp


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================

"UJ" <fr**@nowhere.comwrote in message
news:uS**************@TK2MSFTNGP03.phx.gbl...
>Is there a way to have items in a drop down list where certain items are
a different color?

How about having items that are strikethrough?

TIA - Jeff.



Feb 5 '07 #3
re:
if I do it row by row, how can I set the options for the items that I add?
What would stop you from assigning html text to surround the database items retrieved ?

Basically, you'd want to create an array of the colors you want to display,
and substitute the array's values in sequential writes.

Post the code you are using to retrieve the items.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"UJ" <fr**@nowhere.comwrote in message news:OB**************@TK2MSFTNGP02.phx.gbl...
Thanks. But I'm binding a table to the items. Even if I do it row by row, how can I set the
options for the items that I add?
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:uw**************@TK2MSFTNGP05.phx.gbl...
>If what you want is like : http://asp.net.do/test/dropdowncolor.aspx

...all you need to do is add :

<option style="color: blue;">One</option>

...to your options.

Here's a handy list of HTML color names :
http://www.w3schools.com/html/html_colornames.asp


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================

"UJ" <fr**@nowhere.comwrote in message news:uS**************@TK2MSFTNGP03.phx.gbl...
>>Is there a way to have items in a drop down list where certain items are a different color?

How about having items that are strikethrough?

TIA - Jeff.




Feb 5 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: SamSpade | last post by:
There seems to be two ways to put things on the clipboard ( I don't mean different formats): SetClipboardData and OleSetClipboard If I want to get data off the clipboard do I care how it was put...
3
by: Russ | last post by:
I have a drop down list on a web page that I pre-fill onload from a SQL table using a SqlDataReader. The line of code that fills the drop down looks like this while(myReader.Read()) {...
3
by: Don Wash | last post by:
Hi There! I have a Server-side Drop-down box in ASP.NET (VB) page. What do I do to widen the Drop down box's Pull-Down list's width? I'm not talking about the Drop-down box's width but the box...
3
by: Stephen Adam | last post by:
Hi there, I'm sure i'm missing something really simple here, all i want to do is get the value of the selected item in a list box. Even after much fiddling about last night I still could not get...
2
by: Yoshitha | last post by:
hi I have 2 drop down lists in my application.1st list ontains itmes like java,jsp,swings,vb.net etc.2nd list contains percentage i.e it conatains the items like 50,60,70,80,90,100. i will...
5
by: Vigneshwar Pilli via DotNetMonster.com | last post by:
string connectionString1 = "server=(local); user=sa;password=sa; database=sonic"; System.Data.SqlClient.SqlConnection dbConnection1 = new System.Data.SqlClient.SqlConnection(connectionString1);...
1
by: pmelanso | last post by:
Hello, I have a drop down list which is dynatically loaded from a database and I have a second drop down list that is also dynatically loaded depending on what is selected in the first drop down...
4
by: Laura K | last post by:
I have a drop down menu which has a list of subcategories and the initial value is "please choose a Subcategory". When the user chooses a subcategory they are taken to a new page where the drop...
1
by: puja | last post by:
hi all, I have a requirement where I need to populate drop down list (which is not run at server control. i.e it is an html control ) using server side code in C#? How can I add option values...
4
by: TycoonUK | last post by:
Hi, As I do not have IE7 on my computer, I was wondering if there is a fault in my CSS Menu when using IE7. Please can someone look at my site - http://www.worldofmonopoly.co.uk and tell me...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...

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.