Telerik RadWindow not showing properly

I am using a RadWindowManager to manage a window that popups up when I click on a control in a TreeList column. The window appears using the OnClick="ShowExisting1();return false;" attribute of the control but does not behave correctly. Here is how I coded it:

<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
    <Windows>
        <telerik:RadWindow ID="RadWindow1" runat="server" NavigateUrl="http://google.com" 
            Skin="Windows7" Animation="Fade" VisibleStatusbar="false" Behaviors="Close" MaxHeight="200px" MaxWidth="200px" 
            MinHeight="200px" MinWidth="200px" InitialBehaviors="Pin" />
    </Windows>
</telerik:RadWindowManager>

but the window behaves like I did:

<telerik:RadWindow ID="RadWindow1" runat="server" />

I have tried the two different declarations and they produce the same result, as if all the specifications I demanded are ignored. What seems to be the problem?

Upvotes: 1

Views: 10795

Answers (2)

I found another way of setting the attributes client-side using some javascript properties:

    <script type="text/javascript">
        function ShowExisting1() {
            //Getting rad window manager
            var oManager = $find('<%= RadWindowManager1.ClientID %>');
            //Get an existing window DialogWindow using getWindowByName
            var oWnd = oManager.getWindowByName("DialogWindow");
            oWnd.set_initialBehaviors(Telerik.Web.UI.WindowBehaviors.Pin);
            oWnd.set_animation(Telerik.Web.UI.WindowAnimation.Fade);
            oWnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close);
            oWnd.set_visibleStatusbar(false);
            oWnd.set_visibleTitlebar(true);
            oWnd.set_modal(true);
            oWnd.set_height("300px");
            oWnd.set_width("500px");
            oWnd.setUrl("CommentWindow.aspx");
            oWnd.center();
            oWnd.show();
        }
    </script>

Upvotes: 2

Shazhad Ilyas
Shazhad Ilyas

Reputation: 1193

Im using like this way and its working fine

<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
    <Windows>
       <telerik:RadWindow ID="DialogWindow" runat="server" InitialBehaviors="None" VisibleStatusbar="false"
            Title="Add New WebCom Resource" Behaviors="Move,close" Modal="true" Width="570px"
            Height="420px">
       </telerik:RadWindow>
    </Windows>
</telerik:RadWindowManager>

Javascript

function showDialog() {
                var oWnd = window.radopen(null, "DialogWindow");
            }

function GetRadWindow() {
            var oWindow = $find("DialogWindow");
            return oWindow;
        }

        function Close() {
            GetRadWindow().close();
        }

ASP.net

<asp:Button runat="server" ID="btnAddResourceDisplay" Text="Add" AccessKey="A" OnClientClick="showDialog();return false;" />
<asp:Button runat="server" ID="btnCancel" Text="Cancel" CausesValidation="false"
                                    OnClientClick="Close(); return false;" />

Upvotes: 0

Related Questions