New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Client-side Events

Event log
RadWindow provides the following client-side events:
  • OnClientBeforeShow - fires just before the RadWindow is shown. You can cancel the show of the RadWindow there
  • OnClientShow - fires after RadWindow is shown
  • OnClientActivate - fires when RadWindow becomes the active window
  • OnClientPageLoad - fires when the page in RadWindow completesloading
  • OnClientBeforeClose - fires just before the RadWindow is closed. You can cancel the closing of the RadWindow there.
  • OnClientClose - fires after RadWindow is being closed
  • OnClientDragStart - fires when the user starts dragging a RadWindow object
  • OnClientDragEnd - fires after RadWindow is being dropped on the page
  • OnClientResize - fires when a RadWindow is being resized
  • OnClientResizeStart - called when the user starts resizing the window.
  • OnClientResizeEnd - called after a resize operation ends.
  • OnClientAutoSizeEnd - fires when a RadWindow's autosize has finished
  • OnClientCommand - fires when the commands Pin, Reload, Minimize and Maximize are executed (when the user presses a titlebar button).
The properties expect the name of a clientside function to be called. When invoked, two arguments are supplied to the function - the sender[the RadWindow itself], and an events argument.

When using the close() method to close a RadWindow you can provide an argument to it and it can be extracted through the arguments of the OnClientClose event by using their get_argument() method. The OnClientbeforeClose and OnClientCommand can be cancelled by the set_cancel(shouldCancel) method the event arguments object provides. Additionally, the OnClientCommand provides the get_commandName() method to get the command that was just fired.
  • DefaultVB.aspx
    • DefaultVB.aspx
    • Dialog.aspx
  • scripts.js
  • styles.css
<%@ Page Language="vb"  %>

<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link href="styles.css" rel="stylesheet" />
    <script src="scripts.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <telerik:RadWindowManager RenderMode="Lightweight" ID="RadWindowManager1" runat="server" EnableShadow="true">
        <Windows>
            <telerik:RadWindow RenderMode="Lightweight" runat="server" ID="RadWindow1" ReloadOnShow="true" RestrictionZoneID="RestrictionZone"
                Height="300px" Width="400px" NavigateUrl="Dialog.aspx" VisibleOnPageLoad="true"
                AutoSize="true" Animation="Fade" OpenerElementID="link1" OnClientCommand="OnClientCommand"
                ShowContentDuringLoad="false" OnClientResizeStart="OnClientResizeStart" OnClientResizeEnd="OnClientResizeEnd"
                OnClientDragStart="OnClientDragStart" OnClientDragEnd="OnClientDragEnd" OnClientActivate="OnClientActivate"
                OnClientPageLoad="OnClientPageLoad" OnClientBeforeClose="OnClientBeforeClose"
                OnClientClose="OnClientclose" OnClientShow="OnClientshow" OnClientBeforeShow="OnClientBeforeShow"
                OnClientAutoSizeEnd="OnClientAutoSizeEnd">
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
    <div id="RestrictionZone" class="demo-container size-narrow">
        <telerik:RadButton RenderMode="Lightweight" AutoPostBack="false" ID="Button1" runat="server" OnClientClicked="OpenWnd" Text="Open RadWindow" OnClientLoad="openButton_load" />
    </div>
    <qsf:EventLogConsole ID="EventLogConsole1" runat="server" AllowClear="true"></qsf:EventLogConsole>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance