get_width inconsistency

2 posts, 0 answers
  1. Antony
    Antony avatar
    41 posts
    Member since:
    Jan 2009

    Posted 03 Feb 2009 Link to this post

    Hello,

    I'm using RadPanel.get_width() to set the width of elements contained within the panel. However, the get_width() function doesn't consistently return the same thing. Sometimes it will return a number and other times it will return a string. 

    For example, if the width is 170 pixels then sometimes it will return '170' and other times it will return '170px'. Is this a bug or am I missing something?

    Thanks,

    Antony


  2. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 06 Feb 2009 Link to this post

    Hello Antony,
    I tried to reproduce the inconsistency you describe, but to no avail. I used the following code for my test:
    <telerik:RadSplitter ID="RadSplitter1" runat="server"
        <telerik:RadPane ID="RadPane1" runat="server" Width="170px"
            <button onclick="GetWidth(); return false;">get_width</button> 
        </telerik:RadPane> 
        <telerik:RadSplitBar ID="RadSPlitBar1" runat="server" /> 
        <telerik:RadPane ID="RadPane2" runat="server"></telerik:RadPane> 
    </telerik:RadSplitter> 
     
    <script type="text/javascript"
    function GetWidth() 
        var pane = $find('<%= RadPane1.ClientID %>'); 
        alert(pane.get_width()); 
    </script> 

    Could you please prepare and send us a simple running project, demonstrating the problem? Once we are able to reproduce it locally, we will do our best to find what causes it.

    Sincerely yours,
    Tsvetie
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top