RadScheduler in RadTabStrip Ajax issues

4 posts, 1 answers
  1. Adonis
    Adonis avatar
    34 posts
    Member since:
    Nov 2008

    Posted 12 May 2011 Link to this post

    Hello,

    I Currently have a couple of radSchedulers inside of radtabstrip  and I switch calendars when clicking on different tabs.

    the issue I am having is I am getting a full page refresh when clicking on the calendar events and displaying the edit form in Modal, I have the Ajax manager setup an example of the code is below , thanks in advance

    <telerik:RadTabStrip runat="server" ID="RadTabStrip1" Orientation="HorizontalTop"
            SelectedIndex="0" MultiPageID="RadMultiPage1">
            <Tabs>
                <telerik:RadTab Text="Cal1">
                </telerik:RadTab>
                <telerik:RadTab Text="Cal2" >
                </telerik:RadTab>
                <telerik:RadTab Text="Cal3" >
                </telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip>
        <telerik:RadMultiPage runat="server" ID="RadMultiPage1" SelectedIndex="0">
            <telerik:RadPageView runat="server" ID="RadPageView1">
            <telerik:RadScheduler ID="RadScheduler1" runat="server" >
             </telerik:RadScheduler>
    </telerik:RadMultiPage>
     
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default" />
    <telerik:RadAjaxManager runat="server" ID="AjaxManager1" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
    <AjaxSettings>
    <telerik:AjaxSetting AjaxControlID="RadScheduler1" >
    <UpdatedControls>
    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
    </UpdatedControls>
    </telerik:AjaxSetting>
    <telerik:AjaxSetting AjaxControlID="RadScheduler2" >
    <UpdatedControls>
    <telerik:AjaxUpdatedControl ControlID="RadScheduler2" />
    </UpdatedControls>
    </telerik:AjaxSetting>
    <telerik:AjaxSetting AjaxControlID="RadScheduler2" >
    <UpdatedControls>
    <telerik:AjaxUpdatedControl ControlID="RadScheduler2" />
    </UpdatedControls>
    </telerik:AjaxSetting>
    </AjaxSettings>
    </telerik:RadAjaxManager>
     
  2. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 18 May 2011 Link to this post

    Hi Adonis,

    Please take a look at the sample project that I prepared to test your scenario. However I don't see anything disturbing in the project. The code works as expected. Could you please point me if you find anything that doesn't works properly?

    Thank you!

    Regards,
    Veronica Milcheva
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. Adonis
    Adonis avatar
    34 posts
    Member since:
    Nov 2008

    Posted 23 May 2011 Link to this post

    Thanks, I'm still not sure what the issue is, I have my project setup similarly to the project that you provided. I do have the RadScheduler loaded in a SharePoint 2010 web part perhaps something in SharePoint is causing the issue
  4. Answer
    Kalina
    Admin
    Kalina avatar
    918 posts

    Posted 26 May 2011 Link to this post

    Hi Adonis,

    I am not sure that I understand the issue correctly.
    However I suppose that you use SharePoint VisualWebPart and you have issues updating the controls in this web part via Ajax postback.
    As I see - you have added RadAjaxManager in the markup of your web part.
    SharePoint has issues when the RadAjaxManager is declared at markup in a user control.
    Let me suggest you overcome this by adding the RadAjaxManager at OnInit event of the web part.
    Additionally please add the AjaxSettings in this manner:
    RadAjaxManager ajaxmgr;
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
      
        RadAjaxManager currentAjaxManager = RadAjaxManager.GetCurrent(Page);
        if (currentAjaxManager == null)
        {
            RadAjaxManager ajaxManager  = new RadAjaxManager() { ID = "RadAjaxManager1" };
            Page.Form.Controls.AddAt(0, ajaxManager);
            Page.Items.Add(typeof(RadAjaxManager), ajaxManager);
      
        }        
      
    }
      
    protected override void CreateChildControls()
    {
        Control control = Page.LoadControl(_ascxPath);
        Controls.Add(control);
      
        RadScheduler sheduler = control.FindControl("RadScheduler1") as RadScheduler;
        RadAjaxLoadingPanel loadingPanel = control.FindControl("RadAjaxLoadingPanel1") as RadAjaxLoadingPanel;
      
      
        RadAjaxManager _manager = RadAjaxManager.GetCurrent(Page);
      
        _manager.AjaxSettings.Clear();
      
        AjaxSetting setting = new AjaxSetting(sheduler.ID);
      
        setting.UpdatedControls.Add(new AjaxUpdatedControl() { ControlID = sheduler.ID, LoadingPanelID = loadingPanel.ID });
        _manager.AjaxSettings.Add(setting);
      
    // add the rest Ajax settings here
       ...
        
      
          
    }

    More details about adding AjaxSettings programmatically you can find at this help article.
    I hope this helps.

    All the best,
    Kalina
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top