This is a migrated thread and some comments may be shown as answers.

refresh different gridview when closing specific radwindow

1 Answer 90 Views
Window
This is a migrated thread and some comments may be shown as answers.
Meng
Top achievements
Rank 1
Meng asked on 18 Oct 2011, 05:01 PM
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");
       }
   }

1 Answer, 1 is accepted

Sort by
0
Meng
Top achievements
Rank 1
answered on 18 Oct 2011, 05:32 PM
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.
Tags
Window
Asked by
Meng
Top achievements
Rank 1
Answers by
Meng
Top achievements
Rank 1
Share this question
or