This is a migrated thread and some comments may be shown as answers.

Change size combo

3 Answers 71 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Leandro
Top achievements
Rank 1
Leandro asked on 22 Aug 2012, 05:20 PM
Good afternoon,

I am creating a WebUserControl, and it got a menu and a RadComboBox, where I created a Width property therein.
Would you like a hint of you have some method that I call the combo update for it, because when I fill my property width does not resize the combo in "Design", but when I compile the project and squeegee on the browser size the combo is in agreement with the value set in the property.

Following is the code used in the annex.

<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="comCedente.ascx.vb" Inherits="GSaaSD.comCedente" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<asp:Panel ID="pnCombo" runat="server" Width="276px" style="float:left;">
    <div id="DivMenu"
        style="float:left;margin-top:0px; width: 150px;height:15px;">
        <telerik:RadMenu ID="RadMenu1" runat="server"
            EnableRoundedCorners="true" EnableShadows="true"
            Width="13px" Height="15px" Skin="Web20"
            BackColor="White" BorderColor="White" style="z-index:100;" ClickToOpen="true" >
            <Items>
                <telerik:RadMenuItem Text="" Width="11px" Height="13px" PostBack="False" ImageUrl="../../Imagens/seta_baixo.png" >
                    <Items>
                        <telerik:RadMenuItem Text="Fornecedor" />
                        <telerik:RadMenuItem Text="Usuário" />
                        <telerik:RadMenuItem Text="Plano de Conta" />
                    </Items>
                </telerik:RadMenuItem>
            </Items>
        </telerik:RadMenu>
        <asp:Label ID="lblCedente" Text="" runat="server" style="z-index:101;margin-left:5px;font-family:segoe ui, arial, sans-serif;font-size:11px;"></asp:Label>
    </div>
    <p style="clear:both;width:15px;height:2px;margin:0px 0px 0px 0px;padding:0px 0px 0px 0px;"></p>
    <telerik:RadComboBox ID="combo" runat="server" EnableAutomaticLoadOnDemand="True"
        EnableVirtualScrolling="True" Filter="StartsWith" ForeColor="#666666" ItemsPerRequest="10"
        LoadingMessage="Carregando..." MaxLength="50" ShowMoreResultsBox="True" AutoPostBack="True"
        Width="275px" Skin="Default"
        style="z-index:102;margin-right:0px;padding-right:0px;">
    </telerik:RadComboBox>
</asp:Panel>

Public Property Width_Combo() As Integer
    Get
        Return Width_Controle_Combo
    End Get
    Set(ByVal value As Integer)
        combo.Width = value
        pnCombo.Width = value
    End Set
End Property

3 Answers, 1 is accepted

Sort by
0
Ivana
Telerik team
answered on 23 Aug 2012, 07:48 AM
Hello Leandro,

I have tested your scenario locally -- and the width seems to act just fine. In my sample, the width of the RadComboBox in the user control is changed upon a button click.
Could you record a video of the troubled behavior at your end so we will be sure that there is no misunderstanding?

Kind regards,
Ivana
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Leandro
Top achievements
Rank 1
answered on 23 Aug 2012, 12:17 PM
Hi Ivana,

well this is exactly the problem, the width of the combo is so time mode execution ... I'd like to set the width property value in the "DESIGN" control already suffered the update. understand? Why in the scene today so he obeys the value set in run mode in the browser now.
0
Ivana
Telerik team
answered on 24 Aug 2012, 11:20 AM
Hi Leandro,

When setting the Width property of RadComboBox, the control's width corresponds to the value set to the aforementioned property in design time as well as in run time. Could you please explain a little bit more on your scenario. If you could record a video of what you are trying to achieve would be even more helpful.

Thank you!

Regards,
Ivana
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ComboBox
Asked by
Leandro
Top achievements
Rank 1
Answers by
Ivana
Telerik team
Leandro
Top achievements
Rank 1
Share this question
or