Miger Rouse
Top achievements
Rank 1
Miger Rouse
asked on 12 Jan 2010, 02:43 PM
Hi all,
I'm a at the begining of the story with RadControls and Ajax, so I need a little bit of assistance please.
Problem:
I have an several RadAjaxPanels on control, all using one AjaxLoadingPanel. Ok, should I simplify - I have 2 RadAjaxControls and when I make callback on first one, and after that, while the first one is still making callback, I start the second one.
Result is that:
1. First callback is interupted and AjaxLoadingPanel disapiers, so it doesn't finish with executing code from CB
2. Second one does what it should but it doesn't show AjaxLoadingPanel html too
Question is why First one doesn't finishes hiss call back and why AjaxLoadingPanel HTML is gone?
I know that this might be trivial but it is making me a lot of problems at this stage, please let me know if I need to provide some code?
Regards,
Miger
I'm a at the begining of the story with RadControls and Ajax, so I need a little bit of assistance please.
Problem:
I have an several RadAjaxPanels on control, all using one AjaxLoadingPanel. Ok, should I simplify - I have 2 RadAjaxControls and when I make callback on first one, and after that, while the first one is still making callback, I start the second one.
Result is that:
1. First callback is interupted and AjaxLoadingPanel disapiers, so it doesn't finish with executing code from CB
2. Second one does what it should but it doesn't show AjaxLoadingPanel html too
Question is why First one doesn't finishes hiss call back and why AjaxLoadingPanel HTML is gone?
I know that this might be trivial but it is making me a lot of problems at this stage, please let me know if I need to provide some code?
Regards,
Miger
6 Answers, 1 is accepted
0
Hello Miger,
I think that the information from the following RadAjax documentation topic will help you will help you implement ajax request queuing to avoid the unwanted results when initiating subsequent async requests.
Best regards,
Sebastian
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.
I think that the information from the following RadAjax documentation topic will help you will help you implement ajax request queuing to avoid the unwanted results when initiating subsequent async requests.
Best regards,
Sebastian
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.
0
Miger Rouse
Top achievements
Rank 1
answered on 22 Jan 2010, 07:39 PM
Hi,
Kind regards,
Miger
0
Miger Rouse
Top achievements
Rank 1
answered on 25 Jan 2010, 03:34 PM
Hi again,
could you please assist me with one more scenario.
I attached something that looks like page layout and task I'm trying to complete.
I have several panels, and inside each one there is RadAjaxPanel, inside RadAjaxPanel are buttons and other nested controls(sub panels with more controls etc) . Problems are start to occur when I put callbacks in queue eg. click on Button1 and after that while callback is not finished yet, click on other buttons. This will start uncontrolled callbacks and endless loops.
At the moment I would like to make this scenario work without RadAjaxManager, could you please point to the problem?
and code behind:
could you please assist me with one more scenario.
I attached something that looks like page layout and task I'm trying to complete.
I have several panels, and inside each one there is RadAjaxPanel, inside RadAjaxPanel are buttons and other nested controls(sub panels with more controls etc) . Problems are start to occur when I put callbacks in queue eg. click on Button1 and after that while callback is not finished yet, click on other buttons. This will start uncontrolled callbacks and endless loops.
At the moment I would like to make this scenario work without RadAjaxManager, could you please point to the problem?
| <head runat="server"> |
| <title></title> |
| <style type="text/css"> |
| .QuoteCover_LoadingPanel |
| { |
| background-color: #EEE; |
| } |
| </style> |
| </head> |
| <telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel1" CssClass="QuoteCover_LoadingPanel"> |
| <div id="loaderAnimationHomeCover"> |
| <span id="loaderAnimationMessageHomeCover">Processing...</span> |
| </div> |
| </telerik:RadAjaxLoadingPanel> |
| <body> |
| <form id="form1" runat="server"> |
| <telerik:RadScriptManager EnableScriptCombine="true" ID="ScriptManager1" EnablePartialRendering="true" runat="server" |
| LoadScriptsBeforeUI="true"> |
| </telerik:RadScriptManager> |
| <div> |
| <asp:Panel Id="Panel1" runat="server"> |
| <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" LoadingPanelID="LoadingPanel1" RequestQueueSize="100000"> |
| <asp:Button Id="Button1" runat="server" onclick="Button1_Click" |
| style="height: 26px" Text="Button1" /> |
| <asp:Panel ID="Panel11" runat="server" Visible="false"> |
| <asp:Literal ID="Liuteral1" runat="server" Text="Literal1"></asp:Literal> |
| </asp:Panel> |
| </telerik:RadAjaxPanel> |
| </asp:Panel> |
| <asp:Panel Id="Panel2" runat="server"> |
| <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel2" LoadingPanelID="LoadingPanel1" RequestQueueSize="100000"> |
| <asp:Button Id="Button2" runat="server" onclick="Button2_Click" |
| style="height: 26px" Text="Button2"/> |
| <asp:Panel ID="Panel21" runat="server" Visible="false"> |
| <asp:Literal ID="Literal2" runat="server" Text="Literal2"></asp:Literal> |
| </asp:Panel> |
| </telerik:RadAjaxPanel> |
| </asp:Panel> |
| <asp:Panel Id="Panel3" runat="server"> |
| <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel3" LoadingPanelID="LoadingPanel1" RequestQueueSize="100000"> |
| <asp:Button Id="Button3" runat="server" onclick="Button3_Click" |
| style="height: 26px" Text="Button3"/> |
| <asp:Panel ID="Panel31" runat="server" Visible="false"> |
| <asp:Literal ID="Literal3" runat="server" Text="Literal3"></asp:Literal> |
| </asp:Panel> |
| </telerik:RadAjaxPanel> |
| </asp:Panel> |
| <asp:Panel Id="Panel4" runat="server"> |
| <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel4" LoadingPanelID="LoadingPanel1" RequestQueueSize="100000"> |
| <asp:Button Id="Button4" runat="server" onclick="Button4_Click" |
| style="height: 26px" Text="Button4"/> |
| <asp:Panel ID="Panel41" runat="server" Visible="false"> |
| <asp:Literal ID="Literal4" runat="server" Text="Literal4"></asp:Literal> |
| </asp:Panel> |
| </telerik:RadAjaxPanel> |
| </asp:Panel> |
| </div> |
| </form> |
| </body |
and code behind:
| public partial class _Test_RadAjax : System.Web.UI.Page |
| { |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| } |
| protected void Button1_Click(object sender, EventArgs e) |
| { |
| System.Threading.Thread.Sleep(1000); |
| Panel11.Visible = (Panel11.Visible) ? false : true; |
| } |
| protected void Button2_Click(object sender, EventArgs e) |
| { |
| System.Threading.Thread.Sleep(1000); |
| Panel21.Visible = (Panel21.Visible)? false : true; |
| } |
| protected void Button3_Click(object sender, EventArgs e) |
| { |
| System.Threading.Thread.Sleep(1000); |
| Panel31.Visible = (Panel31.Visible) ? false : true; |
| } |
| protected void Button4_Click(object sender, EventArgs e) |
| { |
| System.Threading.Thread.Sleep(1000); |
| Panel41.Visible = (Panel41.Visible) ? false : true; |
| } |
| } |
0
Hello Miger,
From your code implementation I see that you use System.Threading.Thread.Sleep calls from the code-behind which may somehow conflict with the RequestQueueSize setting. Can you check whether removing them alleviates the abnormality?
Alternatively, remove the RadAjaxPanels and use a single RadAjaxManager (with RequestQueueSize set) to ajaxify the regular asp Panels. See the resources linked below for more details:
http://demos.telerik.com/aspnet-ajax/ajax/examples/manager/firstlook/defaultcs.aspx
http://www.telerik.com/help/aspnet-ajax/ajxajaxmanager.html
Best regards,
Sebastian
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.
From your code implementation I see that you use System.Threading.Thread.Sleep calls from the code-behind which may somehow conflict with the RequestQueueSize setting. Can you check whether removing them alleviates the abnormality?
Alternatively, remove the RadAjaxPanels and use a single RadAjaxManager (with RequestQueueSize set) to ajaxify the regular asp Panels. See the resources linked below for more details:
http://demos.telerik.com/aspnet-ajax/ajax/examples/manager/firstlook/defaultcs.aspx
http://www.telerik.com/help/aspnet-ajax/ajxajaxmanager.html
Best regards,
Sebastian
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.
0
Miger Rouse
Top achievements
Rank 1
answered on 25 Jan 2010, 08:55 PM
Hi Sebastian,
thank you for your quick response. Again it would require much more effort at the moment to substitute all RadAjaxPanels on project with setting up a RadAjaxManager so here is the code that I tried too and that should simulate some operation that consumes some amount of time. With this example same thing happens and I would really appreciate if you have any explanation that could help.
Thanks again!
thank you for your quick response. Again it would require much more effort at the moment to substitute all RadAjaxPanels on project with setting up a RadAjaxManager so here is the code that I tried too and that should simulate some operation that consumes some amount of time. With this example same thing happens and I would really appreciate if you have any explanation that could help.
| public partial class _Test_RadAjax : System.Web.UI.Page |
| { |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| } |
| protected void Button1_Click(object sender, EventArgs e) |
| { |
| Counter(); |
| //System.Threading.Thread.Sleep(1000); |
| Panel11.Visible = !(Panel11.Visible); |
| } |
| protected void Button2_Click(object sender, EventArgs e) |
| { |
| Counter(); |
| //System.Threading.Thread.Sleep(1000); |
| Panel21.Visible = !(Panel21.Visible); |
| } |
| protected void Button3_Click(object sender, EventArgs e) |
| { |
| Counter(); |
| //System.Threading.Thread.Sleep(1000); |
| Panel31.Visible = !(Panel31.Visible); |
| } |
| protected void Button4_Click(object sender, EventArgs e) |
| { |
| Counter(); |
| //System.Threading.Thread.Sleep(1000); |
| Panel41.Visible = !(Panel41.Visible); |
| } |
| void Counter() |
| { |
| for (long i = 0; i < 100000000; i++) ; |
| } |
| } |
Thanks again!
0
Hello Miger,
I tried to replicate the issue locally but unfortunately to no avail. To progress in our investigation, please isolate a stripped working version of your project and send it enclosed to a regular support ticket. We will test/debug it locally and will get around to you with our findings.
You may also temporary try the same scenario with RadAjaxManager to compare the results.
Kind regards,
Sebastian
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.
I tried to replicate the issue locally but unfortunately to no avail. To progress in our investigation, please isolate a stripped working version of your project and send it enclosed to a regular support ticket. We will test/debug it locally and will get around to you with our findings.
You may also temporary try the same scenario with RadAjaxManager to compare the results.
Kind regards,
Sebastian
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.