Use web service for page load and then disable it.

2 posts, 0 answers
  1. Hemika
    Hemika avatar
    38 posts
    Member since:
    Dec 2012

    Posted 29 Jan 2014 Link to this post


    I have created an asp page that has a telerik scheduler control. I am binding all the appointments in the Page_Load function and I have also implemented other functions such as "OnAppointmentInsert", "OnAppointmentUpdate", "OnAppointmentDelete" and so on. Everything is working correctly.

    Now I have a requirement to load the appointments after the page is loaded. Therefore I used the webservice functionality that telerik provides(Link1 , Link2).
    So now once the page is loaded, the scheduler will call the "GetAppointments" function of the webservice and bind the appointments to the calender.

    Now when I move an appointment, it calls the method that was mentioned in the webservice.
    public IEnumerable<AppointmentData> UpdateAppointment(SchedulerInfo schedulerInfo, AppointmentData appointmentData)

    But what I want is to call the following function which was written on the page cs file.
    protected void RadScheduler1_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)

    What I need is that once the appointments are bounded to the scheduler, the use of the webservice should get disabled. So that it would use the server events I added earlier such as "OnAppointmentInsert", "OnAppointmentUpdate", "OnAppointmentDelete".

    However my primary objective is to load the appointments once the page is completely loaded.

    Hemika Kodikara
  2. Boyan Dimitrov
    Boyan Dimitrov avatar
    2062 posts

    Posted 31 Jan 2014 Link to this post

    Hello Hemika,

    I would like to clarify that changing the web service binding with server-side binding is not supported scenario. Either one approach for populating the RadScheduler with data is allowed and could be used. I would like to note something important about the RadScheduler server-side binging: In order to work as expected we recommend populating RadScheduler with data on Page_Init server-side event.

    Boyan Dimitrov
    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 UI for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top