Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

DropDownList backcolor only on first item??

Posted on 2004-10-08
2
Medium Priority
?
493 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 20

Accepted Solution

by:
TheAvenger earned 1000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

596 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