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

Bug Report: Animations Prevent AutoSize from Working

7 Answers 124 Views
Window
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 02 Nov 2009, 06:28 PM
Hello,

I'm running 2009.2.826.35 and if I have AutoSize set to true. If I set the Animation property to anything but "None," the window doesn't autosize. It opens at ~ 300px by 300px.

This behavior is consistent on Firefox and IE.

Has anyone else seen this? Is there a workaround?

Autosize works fine with Animations set to None but it sure is boring! :)

Jeff

7 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 03 Nov 2009, 01:38 PM
Hello Jeff,

The autosize demo of the control actually uses animation (Fade). Could you please tell me what is your exact scenario?


Kind regards,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Jeff
Top achievements
Rank 1
answered on 03 Nov 2009, 06:55 PM
Hi Georgi,

I think the difference is the AutoSize demo presets the height and width. I leave those values at their default so that the AutoSize property sets the window to the correct size (that's what it's for, right).

Here's how my RadWindow looks in the aspx file:
    <telerik:RadWindow ID="wndPageProperties" runat="server" Skin="Office2007"  
        AutoSize="True" Modal="True" 
        NavigateUrl="/Take7/Sitefinity/Admin/DeviseAdmin/Pages/PageProperties.aspx"  
        Overlay="True" Title="Page Properties" Animation="Resize"
    </telerik:RadWindow> 
 

It's also worth noting that clicking the refresh button on the caption bar forces the window to auto size.

Jeff
0
Georgi Tunev
Telerik team
answered on 05 Nov 2009, 11:27 AM
Hi Jeff,

Thank you for the code - now I was able to reproduce the problem. I logged it in our database and we will do our best to have it fixed for the next service pack. Your points were updated.


Regards,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Gene
Top achievements
Rank 1
answered on 19 Nov 2009, 01:03 AM
Is there any scenario where the AutoSize works?
0
Georgi Tunev
Telerik team
answered on 19 Nov 2009, 11:11 AM
Hi Gene,

With the current version of the control, AutoSize works as expected as long as there is no animation. The problem discussed in this thread is already fixed in our internal builds and scenarios where autosize and animations are enabled will be supported once the service pack is released.


Best wishes,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Gene
Top achievements
Rank 1
answered on 30 Dec 2009, 10:58 PM
I have yet to get this to work and I am on 2009.3.1103.20.  It doesn't matter if I have animation set to none or not.

My markup looks pretty straightforward:

    <telerik:RadWindow ID="RadWindow1" runat="server" Modal="True" OnClientClose="OnClientClose" 
        Overlay="true" Animation="Resize" OpenerElementID="<%# btnSampleSelector.ClientID %>" 
        NavigateUrl="sample_selector.aspx" Behavior="Default" 
        Behaviors="Resize, Close, Maximize, Move" AutoSize="True">  
    </telerik:RadWindow> 

Any ideas?
0
Svetlina Anati
Telerik team
answered on 31 Dec 2009, 11:29 AM
Hello Gene,

Thank you for the provided code, I built up a test demo based on it and I was able to reproduce the problem with the version you have mentioned.

The problem comes from the fact that the animation script and the autosize script are trying to execute together and thus you do not get the desired result. In fact if I remove the animation the autosize starts working as expected.

I am glad to inform you that the problem is fixed in the 2009 Q3 release, namely 2009.3.1208 - I tested your code with both the animation and autosize and it worked fine with the latest build.

In order to fix the problem with your current build you should remove the AutoSize="true" and to call it manually in the OnClientShow event with timeout equal to the animation to ensure that it will start executing after the animation has ended. I prepared for you the following code snippet:

<script type="text/javascript">
  
function OnClientShow(sender, args)
{
   setTimeout(function(){sender.autoSize(true);}, 500);
}
  
</script>
<asp:Button ID="btnSampleSelector" runat="server" Text="Open RadWindow" />
<telerik:RadWindow ID="RadWindow1" runat="server" Modal="True" Overlay="true" Animation="Resize"
    OnClientShow="OnClientShow" OpenerElementID="<%# btnSampleSelector.ClientID %>"
    NavigateUrl="Dialog.aspx" Behavior="Default" Behaviors="Resize, Close, Maximize, Move">
</telerik:RadWindow>

It autosizes the RadWindow with animation for the autosize as well - I assumed that you would like this effect since you are using animation for showing it. If you want to autosize the RadWindow without animation for the autosize itself, you should call the method autoSize without argument or with argument false.

I hope that my reply is helpful, let me know how it goes.

Sincerely yours,
Svetlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Window
Asked by
Jeff
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Jeff
Top achievements
Rank 1
Gene
Top achievements
Rank 1
Svetlina Anati
Telerik team
Share this question
or