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

Rad Ajax nested loading

3 Answers 133 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Roy
Top achievements
Rank 1
Roy asked on 27 Jul 2008, 12:23 PM
hello,

i'm using rad ajax loading panels in order to reduce post backing in my website.
i've been using a scenario where i have nested ajax loading panel, which means something like this:
<asp:panel id="p1" runa.... >
<asp:label id="l1" runa....></asp:label>
<asp:button id="b1" runa.... />
</asp:panel>
<asp:button id="b2" runa.... />

when clicking button "b1", it changes the label, when clicking button "b2" it changes the panel.
i've created 2 different RadAjaxLoadingPanels, and using
RadAjaxManager, tied each one to a different button and asp control as previously explained.
it is much similar to telerik's example of show/hide controls in RadControlsForAsp.NetAjax/ajax/common.

the problem which occured was that after pressing button "b1", ie refreshing the label data, when trying the press button "b2" the label would not dissapear for the duration of the "postback". only after pressing the "b2" button once more, did it return to normalicy, and yet pressing the "b1" button again would cause the same problem...

i've been trying to understand why my example is different from the telerik example, i even tried changing the buttons to radiolists, to no avail...
for the record, i tried copying telerik's example's code, and it worked. yet, it's just not enough...

any help will be welcomed

3 Answers, 1 is accepted

Sort by
0
Roy
Top achievements
Rank 1
answered on 28 Jul 2008, 06:00 AM
i've mannaged to figure out one more thing:
when using the outer invoker in a different cell at the same row as the panel, it works (as in telerik's example)! for instance:

<table><tr><td>
<asp:button id="outer" runa...>
</td><td>
<asp:panel id="p" runa...>
<asp:label id="l" runa...>
<asp:button id="inner" runa...>
</asp:panel></td>
</tr></table>

but seperating the outer button and the panel with a different row, it doesn't work:

<table><tr><td>
<asp:button id="outer" runa...>
</td></tr><tr><td>
<asp:panel id="p" runa...>
<asp:label id="l" runa...>
<asp:button id="inner" runa...>
</asp:panel></td>
</tr></table>

in my web site, there is no table as of now, but even if there will be, it would be seperated with rows and not cols.
what can i do?
0
Kevin
Top achievements
Rank 1
answered on 29 Jul 2008, 08:01 PM
I am having a similar problem to this.  I have a nested panel of the form:
<asp:Panel ID="pnlSteps2and3" runat="server">
...
<asp:Panel ID="pnlDefaultValueControls" runat="server">
...
</asp:Panel>
</asp:Panel>

If no AJAX operations are performed on the inner-panel everything "hides" during an AJAX postback as expected.  However If I perform an AJAX update on the inner Panel and then an AJAX update on the outer Panel, the controls in the inner panel do not 'hide' as expected (to clarify, the label in this panel will disappear, but the ImageButton, RadDatePicker, etc do not 'hide').

As the previous poster stated, if I then AJAX update the outer panel, the inner panel again 'hides' everything as expected.

Do you have any resolutions for this problem?

Thank you,
Kevin
0
Rosen
Telerik team
answered on 30 Jul 2008, 12:51 PM
Hi Roy,

Unfortunately I have to confirm that there are a few issues with RadAjax and nested updated controls. Our developers are currently in the process of thorough research to resolve them.

Meanwhile you can try adding nested controls' ajax settings first and then the ones for the parent control. Therefore in the depicted case the AjaxManager declaration will look similar to this:

 <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">  
                <AjaxSettings> 
                    <telerik:AjaxSetting AjaxControlID="Button2">  
                        <UpdatedControls> 
                            <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1"/>  
                        </UpdatedControls> 
                    </telerik:AjaxSetting> 
                    <telerik:AjaxSetting AjaxControlID="Button1">  
                        <UpdatedControls> 
                            <telerik:AjaxUpdatedControl ControlID="Label1" LoadingPanelID="RadAjaxLoadingPanel2"/>  
                        </UpdatedControls> 
                    </telerik:AjaxSetting>                      
                </AjaxSettings> 
            </telerik:RadAjaxManager> 
              
            <asp:Panel runat="server" ID="Panel1">  
                <asp:Label runat="server" ID="Label1" Text="Text"></asp:Label> 
                <asp:Button runat="server" ID="Button1" Text="InnerButton" OnClick="Button1_Click" /> 
            </asp:Panel> 
            <asp:Button runat="server" ID="Button2" Text="OuterButton" OnClick="Button2_Click" /> 
              
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">  
                <img src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading2.gif") %>' 
                    alt="Loading..." style="border: 0;" /> 
            </telerik:RadAjaxLoadingPanel> 
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server">  
                <img src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading2.gif") %>' 
                    alt="Loading..." style="border: 0;" /> 
            </telerik:RadAjaxLoadingPanel> 

Please give this suggestion a try and see if this helps.

Best regards,
Rosen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
Roy
Top achievements
Rank 1
Answers by
Roy
Top achievements
Rank 1
Kevin
Top achievements
Rank 1
Rosen
Telerik team
Share this question
or