RadListBox Width Setting Problem 2015.1.401

4 posts, 0 answers
  1. Shawn R.
    Shawn R. avatar
    4 posts
    Member since:
    Nov 2008

    Posted 01 May 2015 Link to this post

    I'm using 2015.1.401 and I have several RadListBoxes throughout my project with a width setting of 100px. The problem is that they now appear to not go below a width of around 140px. I created a simple page I created to rule out all other possibilities.

     

     

    <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm9.aspx.vb" Inherits="PWOnline.WebForm9" %>
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    <head runat="server">
        <title></title>
    </head>
     
    <body>
        <form id="form1" runat="server">
     
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
     
            <div>
                <telerik:RadListBox ID="RadListBox1" runat="server" Height="250px" Width="50px">
                </telerik:RadListBox>
            </div>
     
        </form>
    </body>
    </html>

     

    Even at this 50px setting it renders as this: http://imgur.com/k3SKVZF

    You can increase the width, but it never goes lower than about 140px now. I didn't see this listed as a known issue in any searches I performed. I was able to get it to look correctly by using CSS and "max-width", but this only made it look correct but the effective width of the control remained about 140px. What I mean is that it rendered at 50px but there was a "ghost" width of 140px as any control placed to the right of the list box couldn't be interacted with for the first 90 pixels.

     

    Anyone else experience this or have a work around?

     

    TIA

     

  2. Magdalena
    Admin
    Magdalena avatar
    421 posts

    Posted 04 May 2015 Link to this post

    Hello  Shawn,

    Because of establishing a minimal width to RadListBox control, there is a min-width CSS property in our inbuilt styles set to 140 pixels. To reset this value, please apply the following:
    html .RadListBox {
        min-width: 0;
    }


    Regards,
    Magdalena
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Shawn R.
    Shawn R. avatar
    4 posts
    Member since:
    Nov 2008

    Posted 04 May 2015 in reply to Magdalena Link to this post

    Thanks for the response. Using the suggestion, it appears as though the width setting of the RadListBox is then ignored and it acts as "auto-fit". I only have one on the page so I made min-width the width I wanted, but I would most likely have to create a style for each RadListBox if I wanted different sizes. Thanks for you help. 
  5. Magdalena
    Admin
    Magdalena avatar
    421 posts

    Posted 05 May 2015 Link to this post

    Hello Shawn,

    The min-width property only limits a minimal width that would be rendered. If you set a width that is wider as the min-width, the width value will be applied. It will not be applied only if the width value is narrower as the min-width value. In this case, the element will be with a min-width value.

    We have attached a sample project where different RadListBox has different width values and all of them are set the min-width property to zero.

    Regards,
    Magdalena
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
Back to Top