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.

selectedAppointment always null

Thread ID:

Created:

Updated:

Platform:

Replies:

123583 Apr 1,2016 04:29 AM Apr 6,2018 02:36 PM Xamarin.Forms 26
loading
Tags: SfSchedule
Luca Franceschini
Asked On April 1, 2016 04:29 AM

Hi,
I'm using a sfSchedule Control (Xamarin.Forms) using DataBinding and View/ViewModel Logic. I'm populating my schedule with a list of  ScheduleAppointment in a ScheduleAppointmentCollection that is binded in with my View.  I can see all my appointment correctly. When i click one of my appointment,the ScheduleCellTapped event is raised correctly but the selectedAppointment of ScheduleTappedEventArgs is always null. How can I fix this problem? thanks

Nijamudeen Mohamed Sulaiman [Syncfusion]
Replied On April 4, 2016 07:58 AM

Hi Luca,

Thank you for contacting Syncfusion Support.

We have already logged an issue report for the same. But could you please provide us the following details to confirm the issue?

1. Issue reproducing platform (Xamarin Forms(iOS), Xamarin Forms (Android)) with version.
2. System Date and Time Zone details.
3. Simple issue reproducing sample or code snippet (if possible).

It will be helpful for us to analyze on it and provide you a possible solution.

Regards,
Nijamudeen M.

Luca Franceschini
Replied On April 4, 2016 10:18 AM

I'm working with both platforms and I have the same problem with Android and IOS.
I Found the same problem using your "Appointment_editor" of  "SampleBrowser-Forms" examples.  
When i click on an existent appointment, the ScheduleCellTapped event is raised , the ScheduleTappedEventArgs has the right dateTime and Schedule,but the selectedAppointment is always null :


        void Schedule_CellTapped(object sender, ScheduleTappedEventArgs args)
        {
            if (args.selectedAppointment != null)
            {
                   .........
            }

this method is called when i click an appointment, but args.selectedAppointment  is always null

Swathi Gopal [Syncfusion]
Replied On April 13, 2016 05:06 AM

Hi Luca,


We have created a support incident under your account to track the status of this issue. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Please let us know, if you have any query.

Regards,

Swathi G


JOSE
Replied On August 16, 2016 10:35 AM

I face exactly the same problem, once the ScheduleCellTapped event is raised no matter if you choose a cell with or without an event, in any case you receive a null value in selectedAppointment attribute. I'm using Xamarin Forms, is there any solution or any workaround?

Thanks.

SfSchedule sf = new SfSchedule();
sf.ScheduleCellTapped += (Object sender, ScheduleTappedEventArgs e) =>
      {
                Console.WriteLine("CELL TAPPED");
                ScheduleAppointment ap = (ScheduleAppointment)e.selectedAppointment;
                if (e.selectedAppointment != null) Console.WriteLine("appoinment:"+ap.Subject);
      };


Subburaj Pandian Veluchamy [Syncfusion]
Replied On August 17, 2016 09:23 AM

Hi Jose,

Thank you for using Syncfusion products.

We have checked and we are unable to reproduce the mentioned issue with “SelectedAppointment in Schedule Xamarin Forms” from our side. We have prepared a sample based on your requirement, please find the sample below,

Sample link: ScheduleTestingSample

If the provided sample doesn’t work, could you please revert us by modifying the provided sample with more information (ScheduleView, Locale) along with its replication procedure, so that we could analyze on it and provide you a solution.

Regards,
Subburaj Pandian V.




Francisco José Espina Aragón
Replied On December 8, 2016 05:04 PM

Hi Jose,

Thank you for using Syncfusion products.

We have checked and we are unable to reproduce the mentioned issue with “SelectedAppointment in Schedule Xamarin Forms” from our side. We have prepared a sample based on your requirement, please find the sample below,

Sample link: ScheduleTestingSample

If the provided sample doesn’t work, could you please revert us by modifying the provided sample with more information (ScheduleView, Locale) along with its replication procedure, so that we could analyze on it and provide you a solution.

Regards,
Subburaj Pandian V.




I have the same incidence.

I downloaded the sample from the previous note (Sample link: ScheduleTestingSample) and it works correctly.

The difference I see is that my project is with XAML Pages and using behaivors.

I am using my user class EventToCommandBehavior:

      <sf:SfSchedule
        ScheduleView = "{Binding TypeView, Mode = TwoWay}"
        DataSource = "{Binding AppointmentCollection}"
        Locale = "es"
        ShowAppointmentsInline = "True">
      
          <sf:SfSchedule.Behaviors>
          
            <local:ScheduleCellTappedBehaivor Command = "{Binding CellTappedCommand}" />
          
            <local:EventToCommandBehavior EventName = "MonthInlineAppointmentTapped"
                                          Command = "{Binding MonthInlineTappedCommand}"
                                          Converter = "{StaticResource ScheduleMonthInlineTappedConverter}" />
                                        
          </sf:SfSchedule.Behaviors>
        </ Sf:SfSchedule>

I have my own Converter classes, for example:


    public class MonthInlineAppointmentTappedEventArgsToAppointmentConverter: IValueConverter
    {
        public object Convert (object value, Type targetType, object parameter, CultureInfo culture)
        {
            var eventArgs = value as MonthInlineAppointmentTappedEventArgs;
            return eventArgs.selectedAppointment;
        }

        public object ConvertBack (object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException ();
        }
    }


The problem is in the line: "eventArgs.selectedAppointment"

Debugging I see that "eventArgs.Schedule" and "eventArgs.datetime" have non-null values, but "eventArgs.selectedAppointment" in IOS always comes with NULL value.

On Android and UWP works ok.

Swathi Gopal [Syncfusion]
Replied On December 9, 2016 05:53 AM

Hi Jose, 

We have created a support incident under your account to track the status of this issue. Please log on to our support website to check for further updates. 

Please let us know, if you have any query. 
  
Regards,
Swathi G 


steve hawkins
Replied On December 12, 2016 07:06 AM

Hi Jose, 

We have created a support incident under your account to track the status of this issue. Please log on to our support website to check for further updates. 

Please let us know, if you have any query. 
  
Regards,
Swathi G 


I'm getting exactly the same issue on iOS
.

Using xcml from end binding to a view model
. Binding work fine and data passed back but 'selected appointment' is always null

Subburaj Pandian Veluchamy [Syncfusion]
Replied On December 13, 2016 07:18 AM

Hi Steve, 
 
We have created a support incident under your account to track the status of this issue. Please log on to our support website to check for further updates. 
 
  
Please let us know, if you have any query.

Regards,
 
Subburaj Pandian V

 


Ione Souza Junior
Replied On January 6, 2017 02:29 PM

Hi, any news about selectedAppointment null?

Subburaj Pandian Veluchamy [Syncfusion]
Replied On January 9, 2017 01:40 AM

Hi Lone Souza,   
 
We have already fixed the mentioned issue “SelectedAppointment is null in Xamarin forms (iOS)” and included the issue fix our latest Essential Studio 2016 Volume 4 Service Pack Release v14.4.0.20 and is available for download under the following link. 
  
 
Please let us if you would require any further assistance.  
 
Regards,  
Subburaj Pandian V.   


Renaud Laloire
Replied On January 10, 2017 10:09 AM

Syncfusion,

I have the same problem on Android and I am using the version 14.4.0.20

I suppose it is not fixed then ;)

Regards,

Renaud

Subburaj Pandian Veluchamy [Syncfusion]
Replied On January 11, 2017 01:43 AM

  
Hi Renaud, 
 
Thank you for your interest in Syncfusion products. 
 
Based on the provided information, we are unable to reproduce the mentioned issue SelectedAppointment is null in Schedule Xamarin Forms (Android) from our side. We have prepared the simple sample, please find the below sample,

Sample Link: SelectedAppointmentSample 
 
If the given solution also doesn’t meet your requirement, could you please modify the provided sample along with its reproducing procedure? It will be helpful for us to analyze on your requirement and provide you a better solution.

 
Regards,   
Subburaj Pandian V.  


Renaud Laloire
Replied On January 17, 2017 08:11 AM

Dear Syncfusion,

I finally been able to identify the bug : When displaying the SfSchedule in a single page, it works fine. But if you use a ViewPager (android control for carousel) which contains the SfSchedule, it is broken. It is like you return the tapped appointment based on the tap position on the screen or something and since the SfSchedule is in a viewpager, it cannot find the clicked appointment.

I needed to have a swipable ViewPager to go from the appointments of one person to another. When displaying only one person, it works but as soon as I had additional persons (page in the ViewPager), it broke.

Can you identify why it follows this behavior and if yes, do you have any idea on a fix ? I use this for the implementation of the ViewPager : https://github.com/alexrainman/CarouselView

Regards,

Renaud Laloire

Renaud Laloire
Replied On January 17, 2017 08:23 AM

Additional thoughts : it might be due to the fact that I have several SfSchedule instantiated at the same time and when I click on an appointment could it be that it tries to find it in another instance of SfSchedule ... ? Just an assomption ...

Subburaj Pandian Veluchamy [Syncfusion]
Replied On January 18, 2017 08:28 AM

Hi Renaud,  
 
Thank you for the update.  
 
Based on the provided information we have checked your requirement Schedule with swipe-able ViewPager for Appointments in Xamarin Forms, tabs with content that support the swipe gesture has not recommendable one. Since we have handled swipe gestures for navigating in the ScheduleView’s, so that while using Schedule in the carousel has not a recommendable. Could you please let us know if you have any query while using Schedule control with more details, it will be helpful for us to analyze on it and provide you a better solution.

 
Regards,   
Subburaj Pandian V.  


Renaud Laloire
Replied On January 19, 2017 04:35 AM

Subburaj Pandian V

I solved my problem by removing the use of ViewPager. For displaying several people schedule, I keep now only one instance of the SfSchedule but I change the DataSource each time on the fly. Reloading data goes fast so I am good with that.

Since I don't have a ViewPager and I only have one SfSchedule, the clicked appointment is never null.

That being said, for future update, I still think that the SfSchedule should work inside a ViewPager.

Thanks for your feedback,

Regards,

Renaud

Subburaj Pandian Veluchamy [Syncfusion]
Replied On January 20, 2017 08:02 AM

 
Hi Renaud,  
  
Thank you for the update.  
  
Based on the provided information, we are unable to reproduce the mentioned issue with Schedule in Xamarin Forms from our side. Could you please provide us more information about the issue by modifying the given sample (SelectedAppointmentSample) with its reproducing procedure? It will be helpful for us to analyze on your requirement and provide you a better solution.

 
Regards,    
Subburaj Pandian V.   


Jeronimo
Replied On February 17, 2017 08:36 PM

Hi, 
I had the same problem but I found it happen only on MonthView. If I switch to DayView from last, and then click on appointment cell everything works fine and can get the selected appointment. I hope could help to someone.

Sivakumar Punniya Moorthi [Syncfusion]
Replied On February 20, 2017 04:09 AM

Hi Jeronimo, 

  

Thank you for the update.  

  

We have created a new support incident under your account to track the status of this issue. Please log on to our support website to check for further updates. 

  

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents 

  

Please let us know, if you have any query.

Regards,
 Sivakumar P

Jon Lacey
Replied On October 9, 2017 06:40 AM

I am getting the same problem with MonthView, I am using 15.3.0.33.

I have a very simple app built in Visual Studio 2017.

The appointment displays correctly in both Week and Month view but the appointment is always empty on CellTapped on the MonthView.

If I set showAppointmentsInline = true and click on the cell, the correct data is shown inline but the CellTapped event has a null Appointment 

Is this still broken?


Subburaj Pandian Veluchamy [Syncfusion]
Replied On October 10, 2017 08:54 AM

Hi Jon Lacey, 
   
We have created a new support incident under your account to track the status of this query. Please log on to our support website to check for further updates. 
 
https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents 

Regards,
Subburaj Pandian V   


steve hawkins
Replied On October 10, 2017 09:10 AM

weirdly enough I found  that if I removed the appointment style in code for the view it passed back the appointment as it should. If i add the appointmentstyle back in code (viewmodel) then the appointment comes back as null.



Subburaj Pandian Veluchamy [Syncfusion]
Replied On October 11, 2017 05:18 AM

Hi Steve, 
   
We have created a new support incident under your account to track the status of this query. Please log on to our support website to check for further updates. 
 
https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents 

Regards,
Subburaj Pandian V   


Shelby
Replied On April 5, 2018 02:53 PM

I have a custom Event class that I am mapping to the SFSchedule but the MonthInlineAppointmentTappedEventArgs.Appointment is always null for both iOS and Android. Is this resolved yet?

Ganeshamoorthy Chandramoorthy [Syncfusion]
Replied On April 6, 2018 02:36 PM

Hi Shelby, 
 
We have checked with the provided information and the issue “MonthInlineAppointment always null for custom events” is not exists in our latest version (16.1.0.32). We have prepared a simple sample with custom appointment. Kindly find the sample below, 
 
Sample: Sample 
 
Could you please check with the provided sample and revert us whether issue prevails? Else, kindly modify the provided sample with issue replication procedure. So that it will be helpful for us to analyze and provide you better solution. 
 
Regards, 
Ganeshamoorthy C 


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.

;