Hi,
I am using the RadCombobox version 2.1.1/2.2 in an old web application that I need to make updates to. I am trying to use client side javascript to adjust the width of a RadCombobox using the OnClientDropDownOpening and Closing events. The Width property does not seem to work for this, I was able to look around the other properties and figured out how to do this, but the scroll bar still displays as the original width. Two questions, how do I adjust the scroll bar with using jscript and is there another way of displaying only the dropdown items at a larger width, keeping the combo box the same smaller width? Also, there's got to be another way to adjust the width than what I am doing in the jscript. Code follows:
I am using the RadCombobox version 2.1.1/2.2 in an old web application that I need to make updates to. I am trying to use client side javascript to adjust the width of a RadCombobox using the OnClientDropDownOpening and Closing events. The Width property does not seem to work for this, I was able to look around the other properties and figured out how to do this, but the scroll bar still displays as the original width. Two questions, how do I adjust the scroll bar with using jscript and is there another way of displaying only the dropdown items at a larger width, keeping the combo box the same smaller width? Also, there's got to be another way to adjust the width than what I am doing in the jscript. Code follows:
function OnClientDropDownOpening(sender, eventArgs) |
{ |
sender.S.style.width = 400; |
} |
function OnClientDropDownClosing(sender, eventArgs) |
{ |
sender.S.style.width = 25; |
} |
<radc:RadComboBox ID="ddReasonCode" runat="server" width="25" NoWrap="true" OnClientDropDownOpening="OnClientDropDownOpening" OnClientDropDownClosing="OnClientDropDownClosing"> |
<Items> |
<radc:RadComboBoxItem runat="server" Text="FB - Explosive and Incendiary" Value="FB" ID="FB"/> |
<radc:RadComboBoxItem runat="server" Text="FE - Poisons (Toxic Chemicals)-Low Degree" Value="FE" ID="FE"/> |
<radc:RadComboBoxItem runat="server" Text="FW - Diving" Value="FW" ID="FW"/> |
</Items> |
</radc:RadComboBox> |