Solved

DropDownList backcolor only on first item??

Posted on 2004-10-08
2
443 Views
Last Modified: 2011-09-20

Hello. I dynamically build a drop down list inside of a datagrid that I want to apply a backcolor to. Right now I'm applying the color to the entire dropdown, but is it possible to apply the color only to the first item in the drop down list? I will always want only the first one highleighted regardless of what name/value pair happens to be the first item. It would look nicer than having the entire thing colored when expanding the list

Here is how I'm building the list:

ddl.DataSource = ds;
ddl.DataTextField = "product_shortdesc";
ddl.DataValueField = "pproduct_id";
ddl.Visible = true;
ddl.BackColor = Color.Yellow;
ddl.DataBind();

thanks in advance!!
0
Comment
Question by:animated405
2 Comments
 
LVL 20

Accepted Solution

by:
TheAvenger earned 250 total points
ID: 12274347
Is this ASP.NET? If yes, it is not possible. You can try to render the elements in several controls, but you will lose the functionality of the DropDownList, so I don't think there is a practical possibility to do that.
0
 

Author Comment

by:animated405
ID: 12274743

thank you.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now