Refresh RadGrid On Close of RadWindow

2 posts, 0 answers
  1. Ronan BARRANGER
    Ronan BARRANGER avatar
    24 posts
    Member since:
    Mar 2010

    Posted 21 Mar 2012 Link to this post


    I have a radgrid with an image on each lines which opens a radwindow. When i close My radwindow i need to refresh the grid which is in the parent page.

    This is how i close my radwindow:

        <asp:Button ID="Validation" runat="server" Text="Enregistrer et envoyer l'offre" OnClick="Validation_Click"
    OnClientClick="if(Page_ClientValidate()) CloseDialog()" UseSubmitBehavior="false"
    function GetRadWindow() {
        var oWindow = null;
        if (window.radWindow) oWindow = window.radWindow;
        else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
        return oWindow;
    function CloseDialog() {
        return true;

    I tried to do it that way in my parent page:

    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
            <telerik:RadWindow ID="RadWindow1" runat="server" Width="700px" Height="500px" Title="Details du ticket"
                Skin="WebBlue" Behaviors="Close, Move" Modal="true" OnClientClose="closeRadWindow">
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />

    <script type="text/javascript"
    function closeRadWindow() 
        $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest();  

    protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)

    It doesn't work. Is there anything i'm missing

    (got a JS error with IE ( Property id null or undefined ), & no error but not working at all with firefox)

    thanks in advance
  2. Marin Bratanov
    Marin Bratanov avatar
    5910 posts

    Posted 23 Mar 2012 Link to this post

    Hi Ronan,

    This is working correctly with me: You can find here my sample page as well so you can compare it with yours and try to locate the difference that is causing this behavior. What I can suggest is that you review if any other script is throwing an error which will prevent AJAX from working. You can also try calling the ajaxRequest() method with a small timeout. i.e.:
    setTimeout(function ()
        $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest();
    }, 100);

    If this works you can reduce the timeout, even 0ms could suffice.

    Kind regards,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top