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.
Unfortunately, activation email could not send to your email. Please try again.

On Tap event of detail appointment

Thread ID:

Created:

Updated:

Platform:

Replies:

124342 May 30,2016 02:21 AM Oct 12,2016 02:57 AM Xamarin.Forms 12
loading
Tags: SfSchedule
Zainal Arifin
Asked On May 30, 2016 02:21 AM

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

Hemalatha Marikumar [Syncfusion]
Replied On May 31, 2016 09:12 AM

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 


Zainal Arifin
Replied On May 31, 2016 10:20 PM

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

Zainal Arifin
Replied On June 1, 2016 04:19 AM

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

Hemalatha Marikumar [Syncfusion]
Replied On June 1, 2016 06:56 AM

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


Zainal Arifin
Replied On June 2, 2016 03:41 AM

Hi Hemalatha,

Thanks for the response.

Best Regards,
Afin

Subburaj Pandian Veluchamy [Syncfusion]
Replied On June 2, 2016 07:05 AM

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.  


Zainal Arifin
Replied On June 8, 2016 02:00 AM

Hi Veluchamy,

Thanks for brief explanation :)

Best Regards,
Afin

Subburaj Pandian Veluchamy [Syncfusion]
Replied On June 8, 2016 11:51 PM

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


Marc Marsiñach
Replied On June 23, 2016 08:16 AM

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?

Swathi Gopal [Syncfusion]
Replied On June 24, 2016 05:24 AM

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  


Sam Moretta
Replied On October 11, 2016 11:03 PM

Hi,

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

Sivakumar Punniya Moorthi [Syncfusion]
Replied On October 12, 2016 02:57 AM

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  


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;