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

How to open RadWindow witout any postback (Need Urgently)

2 Answers 138 Views
Window
This is a migrated thread and some comments may be shown as answers.
Manish
Top achievements
Rank 2
Manish asked on 18 Oct 2011, 06:51 AM
Hi,

I am opening a rad window from javascript but it opens with parent page reload.

 function OpenAddNewDocument() {
            window.radopen("AddNewDocument.aspx", "rwAddNewDocument");
            return false;
        }


<input id="btnAddDoc" type="button" value="Add New Document" class="btnAddDoc" title="Add New Document" runat="server"
           onClick="return OpenAddNewDocument();" />


Please help to open this window without postback.


Thanks
Manish.

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 18 Oct 2011, 08:14 AM
Hello Manish,

I have tried the same code and that opened the RadWindow without any postback. Please make sure that you are not explicitly calling any postback from clientside.
Opening Windows

Thanks,
Princy.
0
Manish
Top achievements
Rank 2
answered on 18 Oct 2011, 09:05 AM
Hi Princy,

Thanks for your reply

Princy I am using input type button without runat="server" but still it taking postback on page see the code and advise me. Because i have not understood any thing from your link (sorry for that ).
See the code javascript and button also and do the needful as soon as possible.
-----------------------------------------------------------------------------------------
Button:

  <input id="btnAddDoc" type="button" value="Add New Document" class="btnAddDoc" title="Add New Document"
           onclick="OpenAddNewDocument(); return false;"/>
-----------------------------------------------------------------------------------------
Radwindow manager:

<telerik:RadWindowManager ID="RWManager" runat="server"
        InitialBehavior="Close" VisibleStatusbar="false" Modal="true" Style="z-index: 7001">
        <Windows >
                 <telerik:RadWindow ID="rwAddNewDocument" ReloadOnShow="true" AutoSize="true" Behaviors="Close" runat="server" Width="500px" Height="420px"  AutoSizeBehaviors="width"/>
        </Windows>
    </telerik:RadWindowManager>
-------------------------------------------------------------------------------------------
Javascript :

 function OpenAddNewDocument() {
            var oWnd = $find("rwAddNewDocument");
            var oWindow = window.radopen("AddNewDocument.aspx", "rwAddNewDocument");
            oWindow.SetSize(612, 430);
            oWindow.Center();
            oWindow.set_initialBehaviors(Telerik.Web.UI.WindowBehaviors.Close);
            oWindow.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close);
            return false;
        }
-----------------------------------------------------------------------------------------------

Please check my code and advise me for the changes.
Tags
Window
Asked by
Manish
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Manish
Top achievements
Rank 2
Share this question
or