6 Answers, 1 is accepted
0
Hi a.bek,
Please find below a sample code snippet that shows the needed approach.
Kind regards,
Paul
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Please find below a sample code snippet that shows the needed approach.
<form id="form1" runat="server"> |
<asp:ScriptManager ID="ScriptManager1" runat="server"> |
</asp:ScriptManager> |
<script language="javascript" type="text/javascript"> |
function OnClientDropDownOpening(sender, eventArgs) |
{ |
if(sender.get_items().get_count() != 0) |
{ |
sender._dropDownWidth = "400"; |
} |
} |
</script> |
<telerik:RadComboBox ID="RadComboBox1" runat="server" OnClientDropDownOpening="OnClientDropDownOpening"> |
<Items> |
<telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem1" Value="RadComboBoxItem1" /> |
<telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem2" Value="RadComboBoxItem2" /> |
<telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem3" Value="RadComboBoxItem3" /> |
</Items> |
<CollapseAnimation Duration="200" Type="OutQuint" /> |
</telerik:RadComboBox> |
</form> |
Kind regards,
Paul
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
a.bek
Top achievements
Rank 1
answered on 28 Aug 2008, 01:18 PM
Hi Paul
thnks for the code i need something more
suppose i have a grid inside the combo and i need to set the dropdownwidth so no horizontal scrollbars to be visible
please provide some sample code
thnks for the code i need something more
suppose i have a grid inside the combo and i need to set the dropdownwidth so no horizontal scrollbars to be visible
please provide some sample code
0
Hi a.bek,
If your grid has fixed width you can achieve your goal using the provide code snippet.
Regards,
Paul
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
If your grid has fixed width you can achieve your goal using the provide code snippet.
<script language="javascript" type="text/javascript"> |
function OnClientDropDownOpening(sender, eventArgs) |
{ |
if(sender.get_items().get_count() != 0) |
{ |
sender._dropDownWidth = "400" + "16"; |
} |
} |
</script> |
Regards,
Paul
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
a.bek
Top achievements
Rank 1
answered on 29 Aug 2008, 08:34 AM
Hi Paul
the problem is that the grid does not have fixed width it uses the default one and i do not know how is calculated/obtained on the client side
the problem is that the grid does not have fixed width it uses the default one and i do not know how is calculated/obtained on the client side
0
Hi a.bek,
Unfortunately without setting explicitly fixed width for the grid which resides in the combobox dropdown, you are not able to determine what size to set for the combobox popup container.
You should either use the approach described below in this thread or expand the RadComboBox dropdown width to 100% to ensure that the embedded grid will fit in it. I hope that one of these options is feasible for your particular case.
Best regards,
Stephen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Unfortunately without setting explicitly fixed width for the grid which resides in the combobox dropdown, you are not able to determine what size to set for the combobox popup container.
You should either use the approach described below in this thread or expand the RadComboBox dropdown width to 100% to ensure that the embedded grid will fit in it. I hope that one of these options is feasible for your particular case.
Best regards,
Stephen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Gary
Top achievements
Rank 1
answered on 05 Mar 2009, 06:13 PM
I am using version 2.1.1 of the RadCombo (not ajax). is there a way of changing the width in 1.1?
Thanks,
Gary
Thanks,
Gary