Telerik RadWindowManager

I am using Telerik radWindowManager to display warning windows. I have a code like this:

<telerik:RadWindowManager ID="window1" runat="server" ReloadOnShow="true" 
EnableEmbeddedBaseStylesheet="false" EnableEmbeddedSkins="false" OnClientClose="javascript:alert('test')">
...
</telerik:RadWindowManager>

The problem is that when I use this code without "OnClientClose", it works fine, but when I add "OnClientClose", a warning is not displayed.

Thank.

+3
source share
2 answers

The OnClientClose attribute takes a pointer to a JS method, not a call.

That's why the Nima M solution works.

On the Telerik RadControls website for ASP.NET AJAX> Documentation> Client Events :

The RadWindow control has a number of properties whose value is the name of a javascript function that runs when specific events occur on the client side.

, JavaScript. RadWindowManager .

+3

, OnClientClose:

    <telerik:RadWindowManager ID="window1" runat="server" ReloadOnShow="true" 
    EnableEmbeddedBaseStylesheet="false" EnableEmbeddedSkins="false" OnClientClose="OnClientCloseHandler">
    ...
    </telerik:RadWindowManager>

<telerik:RadCodeBlock ID="rcbModal" runat="server">
    <script language="javascript" type="text/javascript">
            function OnClientCloseHandler(radWindow) {
                //Do Domething Here
            }
    </script>
</telerik:RadCodeBlock>
+2

Source: https://habr.com/ru/post/1791160/


All Articles