RadDropDownList width

4 posts, 0 answers
  1. RaY
    RaY avatar
    3 posts
    Member since:
    Sep 2013

    Posted 30 Jan 2014 Link to this post

    I'm using RadDropDownList but I have a problem when I set a width to the component.

    The textbox have the desired width but the list of items doesn't have it. That works fine with RadCombobox where either the textbox and the list of items adjust to the width I set.

    I attach a few images to explain what I mean.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 30 Jan 2014 in reply to RaY Link to this post

    Hi Ray,

    Please have a look into the following code snippet which works as expected for me.

    ASPX:
    <telerik:RadDropDownList ID="RadDropDownList1" runat="server" Width="500px">
        <Items>
            <telerik:DropDownListItem Text="Item1" />
            <telerik:DropDownListItem Text="Item2" />
        </Items>
    </telerik:RadDropDownList>

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. RaY
    RaY avatar
    3 posts
    Member since:
    Sep 2013

    Posted 31 Jan 2014 in reply to Princy Link to this post

    I have tried your code with the same result than you, but if I change the Width to "1500px" for example, the control size doesn't change.

    If I do it using css, the size of the control itself change, but not the list of items size:

    .RadDropDownList.RadDropDrownListShort,
    .RadDropDrownListShort .rddlPopup {
        width: 80px !important;
    }
  5. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 02 Feb 2014 in reply to RaY Link to this post

    Hi Ray,

    Please try the following CSS which works as expected for me.

    CSS:
    <style type="text/css">
        .RadDropDownList, .rddlPopup
        {
            width: 1500px !important;
        }
    </style>

    Thanks,
    Princy.
Back to Top