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

get_width inconsistency

1 Answer 43 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Antony
Top achievements
Rank 1
Antony asked on 03 Feb 2009, 09:44 AM
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


1 Answer, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 06 Feb 2009, 02:24 PM
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.
Tags
Splitter
Asked by
Antony
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Share this question
or