refresh different gridview when closing specific radwindow

2 posts, 0 answers
  1. Meng
    Meng avatar
    57 posts
    Member since:
    Apr 2011

    Posted 18 Oct 2011 Link to this post

    Hi, I need to refresh different gridview when closing specific radwindow. Basically, I have three gridviews in the main page(gridview1, 2, 3), and two rad windows(win1, win2). gridview1 need to be refreshed when win1 closes. gridview2 and gridview3 need to be refreshed when win2 closes.

    Both of them working fine seperately. I need to comment out the first <telerik:AjaxSetting> section in order to refresh gridview2 and gridview3. And comment out the second and the third  <telerik:AjaxSetting> section in order to refresh gridview1. As soon as all the three <telerik:AjaxSetting> sections are in the code, it stoped working.

    It seems that there is a conflict between the gridviews. Any help would be greatly appreacited.

    Following is my code:

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"
        <AjaxSettings>       
                    <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"
                        <UpdatedControls
                            <telerik:AjaxUpdatedControl ControlID="gridview1" /> 
                        </UpdatedControls
                    </telerik:AjaxSetting
                    <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"
                        <UpdatedControls
                            <telerik:AjaxUpdatedControl ControlID="gridview2" /> 
                        </UpdatedControls
                    </telerik:AjaxSetting
                    <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"
                        <UpdatedControls
                            <telerik:AjaxUpdatedControl ControlID="gridview3" /> 
                        </UpdatedControls
                    </telerik:AjaxSetting>  
    </AjaxSettings
    </telerik:RadAjaxManager>

    function refreshGrid1(arg) {
           if (!arg) {
               $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("gridview1");
           }
       }
       function refreshGrid2N3(arg) {
           if (!arg) {
               $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("gridview2n3");
           }
       }
  2. Meng
    Meng avatar
    57 posts
    Member since:
    Apr 2011

    Posted 18 Oct 2011 Link to this post

    Found out the problem. I have made the gridview invisible using " gridview2.visible = false", RadAjaxManager cannot find the gridview, and that's caused the problem. I think I should use "display:none" instead. Thanks anyway.
Back to Top