We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

On Tap event of detail appointment

Dear Syncfusion Support,

I'm using SFCalendar tools from syncfusion.
how do I get on tap event on appointment detail in calendar ?
I'm sending you screenshot to get clear understanding of my question, I would like to set on tap event of red square.
Please advise

Thanks

Best Regards,
Afin


Attachment: SFCalendar_OnTapped_c82b8ded.rar

12 Replies

HM Hemalatha Marikumar Syncfusion Team May 31, 2016 01:12 PM UTC

Hi Afin,

Thanks for contacting Syncfusion Support.

We can get the CalendarInlineEvent appointments using CalendarTapped event in Xamarin.Forms. You can achieve your requirement by using the following code Example ,

Code Example, 

  
void sfCalendar_CalendarTapped(object sender, SfCalendar.CalendarTappedEventArgs e)
{
CalendarInlineEvent eventlist=(CalendarInlineEvent)e.P2.Get(0); // First indexed calendarInline event
 
String subject=eventlist.Subject;
}
 


Regards,
Hemalatha M.R 



ZA Zainal Arifin June 1, 2016 02:20 AM UTC

Hi Hemalatha,

Thanks for the response, but the event trigger is on tap the calendar. What I meant was when I tap the event in line detail. Let's say (in my first attachment) I have 2 events in June 1st, Conference and Target Meeting. I want the event when I tap the Conference, I go to detail so that I can edit my task.

Please advise

Thanks

Best Regards,
Afin


ZA Zainal Arifin June 1, 2016 08:19 AM UTC

Hi Hemalatha,

I'm changing the object to use SFSchedule and it works fine for me.
But I have 2 questions regarding this object.
1. what is the definition of P0, P1, P2, P3 ?
2. Can I put 1 additional field to appointmentcollection ?

Regarding to my point 2 questions, my case is, I'm synchronizing the appointment to my internal system. When I tap on schedule box, I'm going to another layout to edit this appointment. Since datetime / subject is not unique, I need to pass the appointment id to my edit appointment layout.

Please advise

Thanks

Best Regards,
Afin


HM Hemalatha Marikumar Syncfusion Team June 1, 2016 10:56 AM UTC

Hi Afin,

Thanks for your update.

Query: Need to edit the Inline event appointments in SfCalendar control.

Currently SfCalendar control does not have a support to edit the inline event appointments. We have already considered this as feature. This implementation will be available in any of our upcoming release. You may also check our website periodically to know about our release.

Regards,
Hemalatha M.R



ZA Zainal Arifin June 2, 2016 07:41 AM UTC

Hi Hemalatha,

Thanks for the response.

Best Regards,
Afin


SP Subburaj Pandian Veluchamy Syncfusion Team June 2, 2016 11:05 AM UTC

Hi Afin,   
   
Thank you for using Syncfusion products.   
   
Query 1: Definitions for argument values    
The InlineAppointmentTapped event in MonthViewSettings of SfSchedule control contains three arguments. Based on the index of those parameters, it is specified as P0, P1 and P2 in Xamarin Android.  Please find the definitions for those parameters below,   
   
   
P0 = Object sender,   
P1 = Calendar calendar,   
P2 = ScheduleAppointment selectedAppointment // contains reference of the appointment which is tapped in the Inline view.   
   
   
Query 2: Additional fields in appointment collection   
Yes, our Schedule control provides support to add additional fields to the appointmentCollection.  For that please refer to the below code example,   
   
public class CustomAppointment : ScheduleAppointment   
    {   
        private int id;   
        public int ID   
        {   
            get { return id; }   
            set { id = value; }   
        }   
   
    }   
  
In the above code example, CustomAppointment class is derived from ScheduleAppointment where the additional properties can be added based on our requirement and create an appointment collection using the CustomAppointments. Please refer to the below code example,   
   
              
CustomAppointment scheduleAppointment = new CustomAppointment();   
   
            scheduleAppointment.ID = 100;     // required unique ID   
            scheduleAppointment.Subject = "Meeting";   
            scheduleAppointment.Color = Color.Blue;   
            scheduleAppointment.StartTime = startTime;   
            scheduleAppointment.EndTime = endTime;   
   
  
The InlineAppointmentTapped event available in the MonthViewSettings of the SfSchedule control is triggered when tapping over the appointment on the Inline view. It contains ScheduleAppointment argument from which we can get the appointment ID (unique attribute) used to achieve your requirement.   
    
   
monthViewSettings.InlineAppointmentTapped += MonthViewSettings_InlineAppointmentTapped;   
   
private void MonthViewSettings_InlineAppointmentTapped(object sender,MonthViewSettings.InlineAppointmentTappedEventArgs e)   
   
        {   
                            var appointmentID = (e.P2 as CustomAppointment).ID; // contains unique ID   
        }   
   
   
If the provided information does not meet your requirement, please give us more details. It will be helpful to analyze your requirement and provide a solution.
   
Regards,   
Subburaj Pandian V.  



ZA Zainal Arifin June 8, 2016 06:00 AM UTC

Hi Veluchamy,

Thanks for brief explanation :)

Best Regards,
Afin


SP Subburaj Pandian Veluchamy Syncfusion Team June 9, 2016 03:51 AM UTC

Hi Afin, 
 
Thank you for the update, please contact us if you need any further assistance on this. 
 
Regards, 
Subburaj Pandian V 



MM Marc Marsiñach June 23, 2016 12:16 PM UTC

Hi Subburaj,

I'm not able to find the InlineAppointmentTapped event in the MonthViewSettings object. I'm currently using the 14.1451.0.46 version. Has It been removed or am I doing something wrong?


SG Swathi Gopal Syncfusion Team June 24, 2016 09:24 AM UTC

Hi Marc , 
 
The previous update with respect to InlineAppointmentTapped Event is for Xamarin.Android platform. For Xamarin.Forms platform, MonthInlineAppointmentTapped event feature has been included in this release Essential Studio 2016 Volume 2 Release v14.2.0.26 , which is available for download under the following link. 
  
 
Kindly find the below code snippet for “MonthInlineAppointmentTapped” event feature. 
 
Code snippet    
  
  
schedule.MonthInlineAppointmentTapped += Schedule_MonthInlineAppointmentTapped; 
 
private void Schedule_MonthInlineAppointmentTapped(object sender, MonthInlineAppointmentTappedEventArgs args) 
        { 
            selectedDate = args.selectedDate; 
            selectedAppointment = args.selectedAppointment; 
        }  
   
Please get in touch with us if you would require any further assistance. 
  
Regards, 
Swathi G  



SM Sam Moretta October 12, 2016 03:03 AM UTC

Hi,

This doesn't seem to be available in Xamarin.ios ???


SP Sivakumar Punniya Moorthi Syncfusion Team October 12, 2016 06:57 AM UTC

Hi Marc, 
  
Thanks for your update. 
  
MonthInline Appointment Tapped event feature is available for the Xamarin.iOS platform. Kindly find the below code snippet for above the same,  
[C#]  
schedule.Delegate = new ScheduleDelegate();  
  
public class ScheduleDelegate : SFScheduleDelegate
    {
        public override void didSelectInlineAppointment(SFSchedule schedule, NSDate selectedDate, ScheduleAppointment appointment)
        {
            string appSubject = appointment.Subject;
        }
    }
 
  
If the provided Information does not meet your requirement, please revert us back with your query. We are happy to assist you. 
  
Regards, 
Sivakumar P  


Loader.
Live Chat Icon For mobile
Up arrow icon