Client-side event radscheduler

8 posts, 0 answers
  1. Jose Granja
    Jose Granja avatar
    84 posts
    Member since:
    Oct 2009

    Posted 27 Jan 2011 Link to this post

    Hi,

    is there any event that fires after an Appointment is beeing updated using Web Service binding? I would like to catch the Appointment Object that is returned in the response and do something with it. I see there is a request success but that doesn't return the response from the updated appointment request. 

    thank you

    regards,

    jose
  2. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 31 Jan 2011 Link to this post

    Hi Jose Granja,

    Unfortunately there is no proper event which fires after updating of appointment. You can use this:

  3. OnClientAppointmentWebServiceUpdating - Occurs when an appointment is about to be updated via Web Service call.
  4. and operate with the appointment just before it is updated.

    Could you please be more specific on what do you want to do with updated appointments so I can think of a workaround.

    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.
  • Jose Granja
    Jose Granja avatar
    84 posts
    Member since:
    Oct 2009

    Posted 31 Jan 2011 Link to this post

    Hi,

    my appointments are binded to patients. so once I update an appointment I want to give the chance to the user to send a reminder email to the patient! So after each update succesful I want to pop up a dialog asking the user if he wants to send the email. Everything is put in place but there's no event for catching the response of the update appoinment send to the webservice. Is there no way to catch de response? If I could catch it then everything would be fine

    regards,

    jose
  • Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 03 Feb 2011 Link to this post

    Hello Jose Granja,

    I understand your requirement. After further investigation I found that you can use the OnClientAppointmentDataBound event. It fires once after insert and further after update.

    Please let me know if this was helpful.

    Best wishes,
    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.
  • Jose Granja
    Jose Granja avatar
    84 posts
    Member since:
    Oct 2009

    Posted 03 Feb 2011 Link to this post

    Hi,

    thanks for the reply but this event fires as well every time an appointment is bounded! so when I get the appointments from the webservice this method fires for each appointment. It is not really what I'm looking. Is there any other way? I'm afraid this event is no suitable at all.

    thanks you,

    regards,

    jose
  • Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 10 Feb 2011 Link to this post

    Hi Jose Granja,

    One possible solution is the use of OnClientRequestSuccess method. Except the known args.get_result() you can go further with the private method _result and get for example the subject of the first appointment:

    function OnClientRequestSuccess(sender, args) {
                alert(args.get_result()[0].Subject);
            }


    Greetings,
    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.
  • Jose Granja
    Jose Granja avatar
    84 posts
    Member since:
    Oct 2009

    Posted 10 Feb 2011 Link to this post

    Hi, I'm afraid this solution isn't very accurate... this will fire everytime a request has been succeded as the name says. But when the update appointment is done the onrequestsuccess return the whole list of appointments. That doesn't make any sense at all, because every time any method succeeds this event will fire! I just want to catch whenever an appointment has been updated and this approach isn't good enough. Is there not any other workaround? I think this is a critical feature in order to give full control of the scheduler to the programmer. Otherwise the scheduler with webservice binding seems very close to the programmer


    regards,

    jose
  • Jose Granja
    Jose Granja avatar
    84 posts
    Member since:
    Oct 2009

    Posted 10 Feb 2011 Link to this post

    I just did that at the end:

    try
                {
                    IEnumerable<AppointmentData> ListAppointmentsData = GetController(schedulerInfo).UpdateAppointment(schedulerInfo, appointmentData);
                    IList<AppointmentData> ListAppointments = new List<AppointmentData>(ListAppointmentsData.Count());
     
                    foreach (AppointmentData Item in ListAppointmentsData)
                    {
                        if (Item.ID.Equals(appointmentData.ID))
                        {
                            Item.Attributes["Updated"] = "1";
                        }
                        ListAppointments.Add(Item);
                    }
     
                    return ListAppointments;
                }
                catch (Exception)
                {
                    return GetController(schedulerInfo).GetAppointments(schedulerInfo);   
                }


    And I look then on the ClientAppointmentCreated if the appointment has de attribute Update
  • Back to Top