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

RadWindow shows on load

5 Answers 174 Views
Window
This is a migrated thread and some comments may be shown as answers.
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Fit2Page asked on 07 Nov 2013, 08:46 AM
Hi,

I have a strange behavior of RadWindow with the following code:
<telerik:RadWindow OpenerElementID = "hyp_YT" BackColor="Yellow" Style="z-index: 9999" Height="446px" Width="784px" ShowContentDuringLoad="false" VisibleStatusbar="false" Animation="Fade" ID="RadWindow1" runat="server">
<ContentTemplate>aaaaaaaaaaaaaaaaaa</ContentTemplate>
</telerik:RadWindow>
 when i fill the property "BackColor" the the contenttemplate, the RadWindow is showing on Page.Load.
See behavior live on http://axxent.ontwikkelruimte.nl

Marc

5 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 08 Nov 2013, 11:30 AM
Hello Marc,

I could not replicate this locally with the provided code. Could you explain how you get to this issue?
Also, please note that the BackColor property is not implemented in RadWindow and it should not be used. If you want to style the content you can use CSS or the content elements themselves (e.g., a Panel in the ContentTemplate).

Here is how the content template should be styled with CSS:
.myClass .rwWindowContent div
{
    background-color: Yellow;
}
where myClass is set in the RadWindow markup so you can cascade through that if you want (and, of course, you may remove it if you want to style all such popups:
<telerik:RadWindow CssClass="myClass" . . . .</telerik:RadWindow>


What I suspect is that some CSS rule or JavaScript code has removed the display:none rule from the div, because RadWIndow puts it by default. Here is how such a RadWIndow would look like before rendering its popup element:
<div style="z-index: 9999; background-color: yellow;" id="RadWindow1">
    <div style="display: none;" id="RadWindow1_C">
         
                    aaaaaaaaaaaaaaaaaa
                 
    </div><input id="RadWindow1_ClientState" name="RadWindow1_ClientState" type="hidden" autocomplete="off">
</div>
which comes from this aspx markup:
<telerik:RadWindow OpenerElementID="hyp_YT" BackColor="Yellow" Style="background-color: yellow; z-index: 9999"
                   Height="446px" Width="784px" ShowContentDuringLoad="false" VisibleStatusbar="false"
                   Animation="Fade" ID="RadWindow1" runat="server">
    <ContentTemplate>
        aaaaaaaaaaaaaaaaaa
    </ContentTemplate>
</telerik:RadWindow>




Nevertheless, if remocing the BackColor is not an option for you, the following script should once again hide any RadWindow ContentTemplate on the page:
function pageLoad()
{
    $telerik.$("div[id$='_C']").hide();
}


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.
0
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
answered on 08 Nov 2013, 11:55 AM
Hi Marin,

The BackColor property is geven to me through Visual Studio. It appears in the Properties list...

Marc
0
Accepted
Marin Bratanov
Telerik team
answered on 08 Nov 2013, 01:32 PM
Hi Marc,

The property is inherited from the base class all our contorls inherit:
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.webcontrol.aspx
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.webcontrol.backcolor.aspx/

This is why it is available in the intellisense and the Properties window.

I do not believe making it throw an exception when used will improve the control, which is why it is left as it is.


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.
0
Santosh
Top achievements
Rank 1
answered on 13 Nov 2013, 05:29 AM
Hello,
My Issue is in radwindow when i click on "close" button page is loading after page is loaded radwindow will be closed but we want to close the window without page load....is their any way to solve this issue??? 
0
Marin Bratanov
Telerik team
answered on 14 Nov 2013, 02:36 PM
Hello Santosh,

I have just answered your question in the other thread where you posted it: http://www.telerik.com/community/forums/aspnet-ajax/window/radwindow-reopening-after-closing-it-in-every-postback.aspx#2871930.


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
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Marin Bratanov
Telerik team
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Santosh
Top achievements
Rank 1
Share this question
or