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

Cannot get Radscheduler to work with Ajax in SharePoint 2010 WebPart

2 Answers 62 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Content and Code
Top achievements
Rank 1
Content and Code asked on 24 Feb 2012, 12:58 PM
Hi,

I am unable to get the radscheduler to work with ajax in sharepoint.

For example when i click on the navigation arrows in the header it does the normal ajax partial postback but then none of the buttons work, the navigation arrow doesnt do anything, double clicking on the appointment does nothing.

2 Answers, 1 is accepted

Sort by
0
Content and Code
Top achievements
Rank 1
answered on 24 Feb 2012, 04:24 PM
Can someone please help with this. Below is the markup:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="Panel1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RsScheduling" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel runat="Server" ID="RadAjaxLoadingPanel1" />
<asp:Panel runat="server" ID="Panel1" CssClass="exampleContainer">
    <telerik:RadScheduler runat="server" ID="RsIMSScheduling" SelectedView="TimelineView"
        ShowNavigationPane="true" Width="100%" Height="70px" OverflowBehavior="Expand"
        OnNavigationComplete="RsScheduling_NavigationComplete" StartEditingInAdvancedForm="false"
        DayView-UserSelectable="false" WeekView-UserSelectable="false" MonthView-UserSelectable="false"
        AllowInsert="false" OnClientAppointmentEditing="OpenEditSchedulePopup" OnClientRecurrenceActionDialogShowing="OnClientRecurrenceActionDialogShowing">
        <TimelineView NumberOfSlots="5" SlotDuration="01:0:00" ColumnHeaderDateFormat="HH:mm"
            TimeLabelSpan="1" UserSelectable="false" />
        <AdvancedForm Modal="true" />
        <ResourceHeaderTemplate>
            Mon</ResourceHeaderTemplate>
    </telerik:RadScheduler>
</asp:Panel>

Outside of the panel all the buttons work, inside it the buttons on the scheduling controls do not work after the first postback.

Same thing works outside of sharepoint.

Also when i wrap the scheduler in an asp.net updatepanel it works as expected.
0
Kalina
Telerik team
answered on 29 Feb 2012, 02:40 PM
Hello,

I tried to reproduce the issue using the code pasted here - but without success.
On my side RadScheduler arrows navigate properly under SharePoint 2010.

I am suggesting you remove the Panel and the AjaxSettings dynamically for example like this:
public class VisualWebPart1 : WebPart
{
    // Visual Studio might automatically update this path when you change the Visual Web Part project item.
    private const string _ascxPath = @"~/_CONTROLTEMPLATES/SchedulerWebPartProject/SchedulerWebPart/VisualWebPart1UserControl.ascx";
 
    protected override void CreateChildControls()
    {
    }
         
    RadAjaxManager ajaxmgr;
    protected override void OnInit(EventArgs e)
    {
 
        base.OnInit(e);
 
        ajaxmgr = new RadAjaxManager();
        Page.Items.Add(typeof(RadAjaxManager), ajaxmgr);
        Page.Form.Controls.AddAt(0, ajaxmgr);
 
    }
 
    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);
 
        Control control = Page.LoadControl(_ascxPath);
        Controls.Add(control);
 
        RadScheduler scheduler = control.FindControl("RadScheduler1") as RadScheduler;
        ajaxmgr.AjaxSettings.AddAjaxSetting(scheduler, scheduler);
    }
}

Regards,
Kalina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Scheduler
Asked by
Content and Code
Top achievements
Rank 1
Answers by
Content and Code
Top achievements
Rank 1
Kalina
Telerik team
Share this question
or