Refresh Grid when RadWindow Closes?

3 posts, 0 answers
  1. Darin
    Darin avatar
    11 posts
    Member since:
    Jan 2013

    Posted 27 Feb 2013 Link to this post

    When a user closes the RadWindow I need to refresh the grid on the page where the RadWindow was opened to reflect the changes the user made in the RadWindow.  How do I do that?
  2. MasterChiefMasterChef
    MasterChiefMasterChef avatar
    152 posts
    Member since:
    Jan 2013

    Posted 27 Feb 2013 Link to this post

    Hi Darin,

    Assuming you've correctly updated the data by the time the RadWindow closes, you can perform any action you want when the Radwindoiw is closed using the OnClientClose event. Inside this event handler you can refresh data in the RadGrid one row at a time by using the updateItem method. If you are refreshing multiple rows the you will need to call this method multiple times.

    Good luck,
    Master Chief
  3. DevCraft R3 2016 release webinar banner
  4. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 03 Mar 2013 Link to this post

    Hi Darin,

    Please take a look into the following code I tried to update a RadGrid using a RadWindow. I have used an asp:DetailView as the Editform for the Parent radgrid. I have used a Javascript function which can be invoked in the ItemCommand event of the DetailView in order to refresh the RadGrid as in this Demo.

    <script type="text/javascript">
        function CloseAndRebind(args) {
        function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow;
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
            return oWindow;

    protected void DetailsView1_ItemCommand(object sender, DetailsViewCommandEventArgs e)
        if (e.CommandName == "Update")
            ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CloseAndRebind();", true);

Back to Top