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

Advanced Form -- Calendar population

1 Answer 46 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Cliff
Top achievements
Rank 1
Cliff asked on 21 Jan 2012, 08:36 PM
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()
            );
}

1 Answer, 1 is accepted

Sort by
0
Ivana
Telerik team
answered on 25 Jan 2012, 02:03 PM
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
Tags
Scheduler
Asked by
Cliff
Top achievements
Rank 1
Answers by
Ivana
Telerik team
Share this question
or