Sequence of function calls changing on adding a radcontrol to webpart.

6 posts, 0 answers
  1. shikha bansal
    shikha bansal avatar
    8 posts
    Member since:
    Sep 2009

    Posted 13 Oct 2009 Link to this post

    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

  2. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 15 Oct 2009 Link to this post

    Hello shikha,

    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.

  3. shikha bansal
    shikha bansal avatar
    8 posts
    Member since:
    Sep 2009

    Posted 20 Oct 2009 Link to this post

    Hi,

    <<<<
    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

  4. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 20 Oct 2009 Link to this post

    Hello 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.
  5. shikha bansal
    shikha bansal avatar
    8 posts
    Member since:
    Sep 2009

    Posted 20 Oct 2009 Link to this post

    Hello Sebastian,

    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

  6. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 22 Oct 2009 Link to this post

    Hello 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.
Back to Top