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

Scrolling then Autosizing Incorrectly Displays Window

2 Answers 58 Views
Window
This is a migrated thread and some comments may be shown as answers.
Pat
Top achievements
Rank 1
Pat asked on 11 Jan 2013, 04:12 PM
I'm using the RadWindow with multiple divs as it's content, while using a LinkButton control and javascript to toggle back and forth between each div.  I want the RadWindow to remain centered throughout the scroll and to autosize properly during the toggle.  The issue i'm having is  when scrolling and clicking the toggle button for the autosize functionality, the RadWindow shoots off the screen.  We have a temporary fix that removes the { position: relative !important; } attribute of the radwindow which resolves the "shooting off the screen" issue, but the RadWindow no longer stays in place when the user scrolls the screen.

The link below is a dropbox link to very simple .aspx examples.  The first being displaying the issue and the second displaying the temporary fix.

Is there any way to achieve my desired functionality?  Thanks for the feedback!

- Pat


Attached Pages (Dropbox link)

2 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 15 Jan 2013, 03:48 PM
Hi Pat,

By default, RadWindow is centered after autosizing, but you have modified its AutoSizeBehaviors so that its top left corner stays in place. Removing that will have it center itself after autosizing. Thus, calling center() immediately after autosizing is not needed.

On scrolling - the Pin behavior of the RadWindow should be used for keeping it in he same position relative to the viewport instead of overriding its position to fixed. The following function can make sure that it is always shown pinned:
function OnClientShow(sender, args)
{
    if (!sender.isPinned())
    {
        sender.togglePin();
    }
}
which is, of course, attached to the OnClientShow event of the control.

I am attaching here your page with my modifications and comments next to them as a reference. A flash video with the expected behavior shown in my end is also present in the archive.

I also advise that you examine the following help article on configuring autosizing: http://www.telerik.com/help/aspnet-ajax/window-troubleshooting-autosize-not-correct.html.

Kind regards,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Pat
Top achievements
Rank 1
answered on 15 Jan 2013, 03:52 PM
Perfect Marin, appreciate the feedback.

Fixed the issue!

- Pat
Tags
Window
Asked by
Pat
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Pat
Top achievements
Rank 1
Share this question
or