We are creating an asp.net webpart that is integrated into a Sharepoint site.
The webpart contains an asp:Panel that contains a RadChart control.
This RadChart control can be edited through the Web part configuration settings.
However, if we add the radchart to a RadAjaxPanel,and add this RadAjaxPanel to the webpart controls, and edit the webpart, the webpart doesnot change on first click of Apply button in Web Part Configuration.
The Webpart is refreshed on the second click of Apply button.
This is happening because the sequence of function calls of the EditorPart and Webpart is changing on adding a RadAjaxPanel.
Can you please help asap.
Wih Regards,
Shikha
5 Answers, 1 is accepted
The issue you depicted is indeed strange and unfortunately I cannot say for certain what might be causing it. Can you please perform a quick test to see whether replacing the RadAjaxPanel with regular MS UpdatePanel instance makes a difference? This will help us determine whether the cause of the abnormality is directly related to our ajax panel or the ASP.NET AJAX framework in general.
Let me know what you findings are.
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.
<<<<
Can you please perform a quick test to see whether replacing the RadAjaxPanel with regular MS UpdatePanel instance makes a difference?
>>>>>
I checked it with updatePanel, and everything is working fine with updatePanel.
Even with RadAjaxPanel, it works fine now, but as I add a RadAjaxLoadingPanel in the controls collection, and associate its ID in the LoadingPanelID of AjaxPanel, the problem comes again.
Please find the following code and let me know if I am missing something.
-----------------------------------------------------------------------------------------------------------------------
protected
override void CreateChildControls()
{
base.CreateChildControls();
// Clear any existing child controls.
Controls.Clear();
RadAjaxLoadingPanel
outerLoadingPanel = new RadAjaxLoadingPanel();
outerLoadingPanel.ID =
"outerLoadingPanel";
this.Controls.Add(outerLoadingPanel);
// Create a panel that will hold chart control.
RadAjaxPanel cvWebPartPanel = new RadAjaxPanel();
cvWebPartPanel.ID =
"cvWebPartPanel";
cvWebPartPanel.LoadingPanelID =
"outerLoadingPanel";
cvWebPartPanel.EnableAJAX =
true;
RadChart radChart = CreateRadChartControl();
if (radChart != null)
{
radChart.EnableViewState =
false;
radChart.ID =
"radChart";
cvWebPartPanel.Controls.Add(radChart);
}
// Add the panel to the controls collection of the web part.
this.Controls.Add(cvWebPartPanel);
// Prevent child controls from being created again.
this.ChildControlsCreated = true;
}
-----------------------------------------------------------------------------------------------------------------------Please reply with a solution asap.
With Regards,
Shikha
I reviewed your code and it seems correct. Addiing RadAjaxLoadingPanel instance and associating it with the RadAjaxPanel should not affect the lifecycle of the web part. Does adding the loading panel last in the Controls collection of the web part (inside the overriden CreateChildControls method) or enabling the viewstate of the chart produces different result?
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.
Thanks for your quick reply.
<<<<<<<<<
Does adding the loading panel last in the Controls collection of the web part (inside the overriden CreateChildControls method) or enabling the viewstate of the chart produces different result?
>>>>>>>>>
1) Enabling the viewstate.
I cannot enable the viewstate because the changes made in the configuration are not reflected if the viewstate of radChart object is set to true.
2) Adding the AjaxLoadingPanel last in the Controls Collection, is not changing the result.
Please help what else I can do to correct this issue.
With Regards,
Shikha
At this point the best means to progress in our investigation is to prepare a simple web part, illustrating the issue explained so far, and send it enclosed to a regular support ticket. Please include MS UpdatePanel and RadAjaxPanel implementation of the web part to compare the results. I will test it on my machine and will get around to you with my findings.
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.