Solved

When disabling dropdownlist - get rid of down icon?

Posted on 2011-09-19
5
238 Views
Last Modified: 2012-05-12
When disabling dropdownlist - is there a way to get rid of down arrow icon on the right end of the control?

  case "System.Web.UI.WebControls.DropDownList":
                        ((System.Web.UI.WebControls.DropDownList)cc).BorderWidth = 0;
                        ((System.Web.UI.WebControls.DropDownList)cc).Enabled = !value;
                        ((System.Web.UI.WebControls.DropDownList)cc).BackColor = System.Drawing.Color.Transparent;


//////////////////////////////  GET RID OF "down" indicator?

                        break;
0
Comment
Question by:knowlton
  • 3
  • 2
5 Comments
 
LVL 8

Expert Comment

by:cloud9manager
ID: 36563850
To my knowledge,. this is not possible. You can, to some extent change the 'look' of a select element via front or backend styling.. . but browsers do not support the removal or modification of that portion of the select element. The best option would be to create a list of options you want to use, and then modify the look/design of it using CSS, etc.
0
 
LVL 8

Expert Comment

by:cloud9manager
ID: 36563862
Alternatively, you can use a Javascript plugin to your preferred lib. and have that control the look/design of your select elements. Essentially, what most of them do is to create and restyle an additional element (eg. a list of items) and pass the 'click' to the hidden, but active, original select element. What JS Lib are you using?
0
 
LVL 5

Author Comment

by:knowlton
ID: 36563898
>>>>What JS Lib are you using?

jQuery

I just love jQuery.  It's the first time in a while I've had FUN doing web development!!!  I love it's power and simplicity.

I could just find-out what option value is "selected", then hide the entire drop down list or even replace it with a <span> that would have the option value from the dropdown as it's inner html.

But first I want to find an asp.net C# solution if there is one...since I already have it doing the disabling for the textboxes.
0
 
LVL 8

Accepted Solution

by:
cloud9manager earned 500 total points
ID: 36563941
Me too.. it's always my first stop for JS candy LOL.

To keep usability as high as possible, I would highly recommend checking into this plugin: https://github.com/fnagel/jquery-ui (this is an extended version of Filament Groups plugin here: http://www.filamentgroup.com/lab/jquery_ui_selectmenu_an_aria_accessible_plugin_for_styling_a_html_select/)

It handles all the things needed for a well executed, and cleanly styled select element (eg. still accessible to screen readers, styling is infinitely adjustable.. etc.)

I hope that helps answer the question and most importantly helps you great a killer UI for your users !!
0
 
LVL 5

Author Closing Comment

by:knowlton
ID: 36567878
thx
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This video discusses moving either the default database or any database to a new volume.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

759 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

21 Experts available now in Live!

Get 1:1 Help Now