Tom Knowlton
asked on
When disabling dropdownlist - get rid of down icon?
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 .DropDownL ist":
((System.Web.UI.WebControl s.DropDown List)cc).B orderWidth = 0;
((System.Web.UI.WebControl s.DropDown List)cc).E nabled = !value;
((System.Web.UI.WebControl s.DropDown List)cc).B ackColor = System.Drawing.Color.Trans parent;
////////////////////////// //// GET RID OF "down" indicator?
break;
case "System.Web.UI.WebControls
((System.Web.UI.WebControl
((System.Web.UI.WebControl
((System.Web.UI.WebControl
//////////////////////////
break;
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.
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?
ASKER
>>>>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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thx