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

Maximized radwindow moves up and slightly off screen when drilling down into SSRS report

2 Answers 70 Views
Window
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 25 May 2012, 07:15 PM
Hi,

I have a RadWindow maximized that opens up a SQL Server Reporting Services report on a Sharepoint server.  In IE7 or IE8 (only browsers I have tested) when the browser is in normal state (say with height of 800px) and opens a report that uses the SSRS drill down feature, the maxmized RadWindow will shift up and the top bar of the RadWindow will disappear when the + button is pressed on the report and subsequently expands.  See screenshots for before and after.     If I min/max browser or resize it, the RadWindow will snap back into its proper maximized position.   Below is my RadWindowManager.  Opened with window.radopen
<telerik:RadWindowManager ID="RadWindowManager1" runat="server"
      KeepInScreenBounds="True"
                    Behaviors="Close" DestroyOnClose="True" style="z-index: 9000"  
                Title="Open Report"
                InitialBehaviors="Maximize" Height="25px" MinHeight="20px" >
  </telerik:RadWindowManager>


2 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 29 May 2012, 03:39 PM
Hi Daniel,

It seems like the element you click is an anchor that points to a certain part of the page and thus what you observe is the default browser behavior when an anchor is clicked - to scroll the page so that its target is at the top. This is usually avoided by setting the href attribute of the anchor to javascript:void(0); so that this default action is cancelled. Alternatively you can attach an onclick handler for the anchor:
function returnPosition()
        {
            setTimeout(function ()
            {
                document.body.scrollTop = 0;
                document.documentElement.scrollTop = 0;
            }, 10);
        }

As a third option I can suggest you call restore() , center() and maximize() methods of this RadWindow when the anchor is clicked.

Greetings,
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
Daniel
Top achievements
Rank 1
answered on 29 May 2012, 08:43 PM

Hi,
Thanks for your reply.  However SSRS via Sharepoint is its own application so I don't have the option of adding any custom code to the report (and hence the anchor tags).   My workaround was to use JQuery bind to the scroll event on the browser window containing the RadWindow when I have the RadWindow maximized (and thus any browser window scroll bars not accessible to user.)   Thus when the SSRS report is drilled down, the scroll event of the page fires and the RadWindow "moves up" allowing me to respond to the event by maximizing the RadWindow again.  

var oManager;
var oActive;
//bound to OnClientPageLoad of RadWindowManager
function
OnClientPageLoad(sender,arg) {
                oManager = GetRadWindowManager();
                oActive = oManager.getActiveWindow();
                $(window).bind('scroll', function () {
                    oActive.restore();
                   oActive.center();
                   oActive.maximize();
                     });
           }

//bound to OnClientClose of RadWindowManager                    
 
function OnClientClose() {             
               $(window).unbind('scroll');
                     }
Tags
Window
Asked by
Daniel
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Daniel
Top achievements
Rank 1
Share this question
or