Advanced Form -- Calendar population

2 posts, 0 answers
  1. Cliff
    Cliff avatar
    1 posts
    Member since:
    Dec 2010

    Posted 21 Jan 2012 Link to this post

    The issue that I am seeing is when I add another calendar to my scheduler, it does not populate in the advanced form calendar drop down until a total refresh (cntrl + f5) is done on the page.  I can see the resources getting returned when doing a postback refresh from the getResources javascript call.  Is there a way to ensure the edit drop down is refreshed upon a partial post back?  My server side code for the post back is below (The code is not totally optimized yet, as I am just trying to figure out why this is happening).

    <telerik:RadScheduler runat="server" ID="rsMySchedule" SelectedView="DayView"
                    FirstDayOfWeek="Sunday" LastDayOfWeek="Saturday" Reminders-Enabled="false"
                    Skin="Windows7"
                    MonthView-VisibleAppointmentsPerDay="10"
                    StartEditingInAdvancedForm="false"
                    ShowAllDayRow="true"
                    EnableDescriptionField="true"
                    AppointmentStyleMode="Default"
                    EnableExactTimeRendering="true"
                    OverflowBehavior="Expand"
                    OnClientAppointmentDataBound="rsMySchedule_appointmentsDataBound"
                    OnClientResourcesPopulating="rsMySchedule_resourcePopulating"
                    OnClientAppointmentsPopulating="rsMySchedule_appointmentsPopulating"
                    OnClientRequestFailed = "rs_MySchedule_clientRequestFailed"
                    WeekView-UserSelectable="true"
                    MultiDayView-UserSelectable="false"
                    TimelineView-UserSelectable="false" >
                    <AdvancedForm Modal="true" />
                    <WebServiceSettings Path="~/Services/SchedulerWebService.asmx" />
                    <TimeSlotContextMenuSettings EnableDefault="true" />
                    <AppointmentContextMenuSettings EnableDefault="true" />
                </telerik:RadScheduler>

    private void InitializeResources()
    {
        var resources = GetUserCalendars(CurrentUserID);
        SchedulerWebService oService = new SchedulerWebService();
     
        var rsxTypes = oService.GetResourceTypes(null);
        rsMySchedule.Resources.Clear();
        if (!IsPostBack) rsMySchedule.ResourceTypes.AddRange(rsxTypes);
     
        rsMySchedule.Resources.AddRange(
            resources
                .Select(rsx => new Telerik.Web.UI.Resource(rsx.Type, rsx.Key, rsx.Text))
                .ToList()
                );
    }
  2. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 25 Jan 2012 Link to this post

    Hello Cliff,

    Thank you for contacting the Telerik team.

    I am not sure I understand your scenario well. Could you please isolate the problem in a sample project and send it us? This way we will be able to troubleshoot the problem locally and provide you with a solution for it.

    Thank you in advance for your cooperation.

    Greetings,
    Ivana
    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
Back to Top