Solved

When disabling dropdownlist - get rid of down icon?

Posted on 2011-09-19
5
244 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:Tom Knowlton
[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
  • 3
  • 2
5 Comments
 
LVL 8

Expert Comment

by:Jesse Matlock
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:Jesse Matlock
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:Tom 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:
Jesse Matlock 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:Tom Knowlton
ID: 36567878
thx
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
using CK editor in iframes 5 28
Query in AngularJS 8 53
How to show selected values from drop down and text box on the popup? 25 27
Web page design problem 3 18
Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

726 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