I use a RadComboBox
when a RadComboBox is disabled, its text is gray.
Customer want the the text sytle of the disabled RadComboBox is normal(not gray just as the color that RadComboBox is enable)
How can i implement it whit RadComboBox?
I have a solution that setting RadComboBox enable, but when you click the right image to display its items, nothing will happen.
so that the RadComboBox looks like is disabled but its color is normal.
can I add some javascript to achieve this?
when a RadComboBox is disabled, its text is gray.
Customer want the the text sytle of the disabled RadComboBox is normal(not gray just as the color that RadComboBox is enable)
How can i implement it whit RadComboBox?
I have a solution that setting RadComboBox enable, but when you click the right image to display its items, nothing will happen.
so that the RadComboBox looks like is disabled but its color is normal.
can I add some javascript to achieve this?
4 Answers, 1 is accepted
0
Accepted

Princy
Top achievements
Rank 2
answered on 27 Feb 2009, 10:02 AM
Hello Charles,
You can use the following code to avoid the dropdown from displaying items:
aspx:
js:
Thanks
Princy.
You can use the following code to avoid the dropdown from displaying items:
aspx:
<telerik:RadComboBox DataSourceID="SqlDataSource2" AutoPostBack="true" DataTextField="FirstName" DataValueField="FirstName" ID="RadComboBox2" runat="server" OnClientDropDownOpening="DropDownOpening" > |
</telerik:RadComboBox> |
js:
<script type="text/javascript"> |
function DropDownOpening(sender, eventArgs) |
{ |
eventArgs.set_cancel(true); |
} |
</script> |
Thanks
Princy.
0
Hi Charles,
Please mind that IE and Firefox treat differently a disabled item. IE automatically grays the text of the disabled item, but FF does not.
Kind regards,
Paul
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Please mind that IE and Firefox treat differently a disabled item. IE automatically grays the text of the disabled item, but FF does not.
Kind regards,
Paul
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0

charles
Top achievements
Rank 1
answered on 27 Feb 2009, 02:57 PM
Hi Princy
Thank your help very much
Thank your help very much
0

charles
Top achievements
Rank 1
answered on 27 Feb 2009, 04:52 PM
<script type="text/javascript"> |
function DropDownOpening(sender, eventArgs) |
{ |
eventArgs.set_cancel(true); |
} |
</script> |
i meet javascript errors when i run this script .
this reason is eventArgs is null;
however when change javascript like this:
<script type="text/javascript"> |
function DropDownOpening(sender, eventArgs) |
{ |
return false; |
} |
</script> It works |