Radwindow close causes full postback

2 posts, 0 answers
  1. Nasiem
    Nasiem  avatar
    9 posts
    Member since:
    May 2009

    Posted 05 Sep 2010 Link to this post

    I'm using a web usercontrol with fields to edit an XML file. I have an "Edit" link on this usercontrol to edit a radgrid on this parent usercontrol by opening a child radwindow then in the child radwindow i save the values and close the child radwindow. The problem I'm having is that the values are saved are refreshed in the parent window and the grid is populated with the new values but the values that I had in the form in other fields get lost because a full postback is caused. Is there a way I can only refresh the grid only on the parent usercontrol instead of refreshing the whole parent. I'm using the following JavaScript to open the radwindow then refresh the parent after the child window is closed.

    Code to open the child radwindow

    function openDevDealTailredPopup(tailoredIndex) {

        var oWnd = radopen(“blabla”, "RadWindow1");

        oWnd.set_modal(true);

        oWnd.SetWidth((document.documentElement.clientWidth) * (95 / 100));

        oWnd.SetHeight((document.documentElement.clientHeight) * (80 / 100));

        oWnd.center();

       

    }

    The code that closes the child radwindow and refreshes the parent usercontrol

    function GetRadWindow() {

        var oWindow = null;

        if (window.radWindow) oWindow = window.radWindow;

        else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;

        return oWindow;

    }

     

    function CloseRadWindow() {

     

        var oWindow = GetRadWindow();

        oWindow.opener = "x";

        oWindow.Close();

         OnClose();

     }

     

                

    function OnClose() {

        var oWnd = GetRadWindow().BrowserWindow;

        oWnd.location.href = oWnd.location.href;

    }

     

    I would appreciate your help on this matter.
    Thanks
    Nasiem
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 06 Sep 2010 Link to this post

    Hello Nasiem,


    You could invoke an ajaxRequest() instead of refreshing the parent page. The documentation shows how to invoke an ajaxRequest from client code.
    Client-Side API

    Now in the code-behind part, rebind the grid. Make sure that you set the AjaxSettings properly.


    -Shinu.
Back to Top