RadWindow shows on load

6 posts, 1 answers
  1. Fit2Page
    Fit2Page avatar
    345 posts
    Member since:
    Feb 2007

    Posted 07 Nov 2013 Link to this post

    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
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 08 Nov 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Fit2Page
    Fit2Page avatar
    345 posts
    Member since:
    Feb 2007

    Posted 08 Nov 2013 Link to this post

    Hi Marin,

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

    Marc
  5. Answer
    Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 08 Nov 2013 Link to this post

    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.
  6. Santosh
    Santosh avatar
    24 posts
    Member since:
    Sep 2013

    Posted 12 Nov 2013 Link to this post

    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??? 
  7. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 14 Nov 2013 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017