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

set_visibleStatusbar doesn't work if RenderMode is lightweight

3 Answers 244 Views
Window
This is a migrated thread and some comments may be shown as answers.
Dev
Top achievements
Rank 1
Dev asked on 04 Nov 2013, 06:56 PM
I have recently upgraded a project to Telerik.Web.UI.dll 2013.3.1015.40.  Our RadWindows are opened through a common handler function which calls set_visibleStatusbar(false), this no longer works if I set RenderMode to auto in web.config and view in a modern browser.  I have verified by manually getting a reference to the window in the browser console and calling the method directly, the status bar does not disappear.

The status bar does disappear if I set the RenderMode to classic in web.config or set VisibleStatusbar="false" in the aspx.

This seems like a bug to me, anything I might have overlooked?

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 05 Nov 2013, 07:15 AM
Hi Rob,

Unfortunately I couldn't replicate the issue at my end. Please have a look into the sample code I tried which works fine at my end.

ASPX:
<telerik:RadWindow ID="RadWindow1" runat="server" Title="Details">
</telerik:RadWindow>
<telerik:RadButton ID="RadButton1" runat="server" Text="ShowWindow" OnClientClicked="OnClientClicked1"
    AutoPostBack="false">
</telerik:RadButton>

web.config:
<appSettings>
  <add key="Telerik.Web.UI.Window.RenderMode" value="lightweight" />
</appSettings>

JavaScript:
<script type="text/javascript">
    function OnClientClicked1(sender, args) {
        var win = $find("<%=RadWindow1.ClientID %>");
        win.set_visibleStatusbar(false);
        win.Show();
    }
</script>

Thanks,
Shinu
0
Dev
Top achievements
Rank 1
answered on 05 Nov 2013, 03:31 PM
Here is a screenshot of it not working.  I'll open a support ticket so I can upload the code.
0
Accepted
Marin Bratanov
Telerik team
answered on 06 Nov 2013, 09:42 AM
Hi guys,

I can confirm this is a bug with the lightweight render mode and I have logged it for fixing.

In the meantime I can offer two workarounds:
- set the VIsibleStatusbar property of the RadWIndowManager to false, if all your RadWindows need no statusbar

OR


- use the following script if some do and you need to hide it for the rest:
oWnd = window.radopen(pageURL, winName);
//will work for classic rendermode
oWnd.set_visibleStatusbar(false);
//will work for lightweight. In classic jQuery will not throw exceptions because of the element it cannot find
$telerik.$(".rwStatusBar", oWnd.get_popupElement()).hide();
var contentElem = $telerik.$(".rwContent.rwExternalContent", oWnd.get_popupElement());
contentElem.height(contentElem.height() + 20);


In Shinu's sample the visibility of the statusbar is toggled before the UI of the control is rendered (i.e., shown for the first time), which is why it worked. After the call to show() (or radopen() or wndManager.open(), of course) the set_visibleStatusbar(false) call will not work.

Regards,
Marin Bratanov
Telerik
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 the blog feed now.
Tags
Window
Asked by
Dev
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Dev
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or