How to open RadWindow witout any postback (Need Urgently)

3 posts, 0 answers
  1. Manish
    Manish avatar
    64 posts
    Member since:
    Jul 2011

    Posted 18 Oct 2011 Link to this post

    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. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 18 Oct 2011 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Manish
    Manish avatar
    64 posts
    Member since:
    Jul 2011

    Posted 18 Oct 2011 Link to this post

    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.
Back to Top