RadWindow close, then refresh radGrid on parent page

4 posts, 0 answers
  1. Amitkumar
    Amitkumar avatar
    66 posts
    Member since:
    Aug 2009

    Posted 03 Dec 2009 Link to this post

    Hi All,

    I am calling radwindow through parent.asxp page, within a that radwindow have one child.aspx page and that page have two tab i.e. One, and Two, within a One tab have a One.ascx user control, and Two tab has a Two.ascx user control. Two.ascx user control have one button, when i click on that buttton it should close radwindow as well as refresh radGrid1 available in parent page, without postback.

    Please reply me.


    Thanks & Regards,
    Amit
  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 08 Dec 2009 Link to this post

    Hello amit,
     
    I suggest to use a RadAjaxManager to perform an ajax request when the RadWindow is closed and to rebind the grid.

    You can find a very detailed and similar demo below:

    http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=window

    Note, that when you install RadControls, our online examples projects are automatically installed on your computer and you can not only examine their full source code, but also extend them further in order to meet your requirements.

    You can open the demos from here:

    Start\Programs\Telerik\RadControls for ASPNET AJAX\Open Sample WebSite In VisualStudio

    The actual location on your hard disk is the following one:

    C:\Program Files\Telerik\RadControls for ASPNET AJAX \Live Demos

    I hope that this information is helpful.


    Kind regards,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Amitkumar
    Amitkumar avatar
    66 posts
    Member since:
    Aug 2009

    Posted 08 Dec 2009 Link to this post

    Hello Admin,

    Please read again the problem, i have radwindow with page and that page have an user control and when i click on button available in user control that timt I would like to refresh the parent page grid.


    Thansk & Regards
    Dharmesh
  5. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 09 Dec 2009 Link to this post

    Hello Dharmesh,

    The demo that Svetlina gave in her reply covers such scenario. The dialog page doesn't use user control, but you can use the same logic in your scenario.
    Please check EditFormCS.aspx(.cs) and DefaultCS.aspx(.cs) files (click on the splitbuttons in the Example Source Code & Description field to examine the different files). For your convenience I will explain the logic of the demo below.
    1. In EditFormCS.aspx, when the Update button is clicked, it updates the database and then outputs a JavaScript function by using ClientScript.RegisterStartupScript(). 
    2. This function (CloseAndRebind()) closes the RadWindow and calls the refreshGrid() function on the parent page.
    3. On the parent page (DefaultCS.aspx), the function that was called in p#2 (refreshGrid()) uses RadAjaxManager's ajaxRequest to rebind the RadGrid control.

     


    Regards,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top