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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SFSchedule databinding and adding appointments, reload data does not update view

Thread ID:

Created:

Updated:

Platform:

Replies:

123462 Mar 18,2016 05:58 PM UTC Nov 17,2016 01:07 PM UTC Xamarin.iOS 4
loading
Tags: SfSchedule
James Baldwinson
Asked On March 18, 2016 05:58 PM UTC

Hello,
  I am trying to use SFSchedule within an Xamarin IOS app targeting iPad. I am successful in creating, displaying a month view schedule. I could not get datasource to work, even with the example code as the two methods were never called. So I am adding appointments to a NSMutableArray within a for loop. This occurs after the view constructor and view did load events as I am using MVVM cross viewmodels to retrieve my data, once the data has been retrieved, an event is raised from the viewmodel to the view to bind the appointments to the schedule control. After which I am calling ReloadData. but this is not refreshing the view and showing the added appointments. If I navigate or select any cell, then the appointments are displayed. Is there another method to call to refresh the monthview and display my appointment information?

I have attached a zip with my View class included for reference.




Attachment: ScheduleView_d7fac3a.zip

Nijamudeen Mohamed Sulaiman [Syncfusion]
Replied On March 21, 2016 12:41 PM UTC

Hi James,

Currently we are analyzing on this requirement. We will update you the details in one business day (22nd Mar, 2016). We appreciate your patience until then.

Please let us know, if you have any query.

Regards,
Nijamudeen M.


Nijamudeen Mohamed Sulaiman [Syncfusion]
Replied On March 22, 2016 12:38 PM UTC

Hi James,

We appreciate your patience.

We have analyzed the provided code snippet. Based on your scenario, we have tested SfSchedule by triggering an event to added appointments to the control in that event and it works fine.  Along with AppointmentCollection changed and Appointment property changed is also listened properly for that please refer our sample browser sample (Xamarin -> iOS -> Schedule->AppointmentEditor).


Could you please cross check the data you have provided while creating appointments through the event. If the provided solution doesn’t meet your requirement, please revert us back with simple issue reproducing sample along with its replication procedure (if possible screenshot)? It will be helpful for us to analyze on your requirement and provide you a possible solution.


Please let us know, if you have any query.

Regards,
Nijamudeen M. 


Emil
Replied On November 16, 2016 04:39 PM UTC

Hello,
  I am trying to use SFSchedule within an Xamarin IOS app targeting iPad. I am successful in creating, displaying a month view schedule. I could not get datasource to work, even with the example code as the two methods were never called. So I am adding appointments to a NSMutableArray within a for loop. This occurs after the view constructor and view did load events as I am using MVVM cross viewmodels to retrieve my data, once the data has been retrieved, an event is raised from the viewmodel to the view to bind the appointments to the schedule control. After which I am calling ReloadData. but this is not refreshing the view and showing the added appointments. If I navigate or select any cell, then the appointments are displayed. Is there another method to call to refresh the monthview and display my appointment information?

I have attached a zip with my View class included for reference.




Attachment: ScheduleView_d7fac3a.zip

Hello James,

I hear you and I believe tha I found a solution for it. If you look at the deep definition of SfSchedule, most of the properties are bindable including ScheduleView. 
If I understand correctly, you need to triger the ScheduleView change in order to refresh the view. So if you are using MVVM like me, you can use it as below

XAML binding;

 <schedule:SfSchedule Grid.Row="1" ScheduleView="{Binding CurrentScheduleView}"

ViewModel:

     private ScheduleView currentScheduleView;

        public ScheduleView CurrentScheduleView
        {
            get { return currentScheduleView; }
            set { currentScheduleView = value;
                RaisePropertyChanged("CurrentScheduleView");
            }
        }

Just a function to twist things in the viewmodel. you can call this one right after your model is loaded in the viewmodel. It should be working. cheers.
 private void TwistScheduleView()
        {
            if (currentScheduleView != ScheduleView.MonthView)
                CurrentScheduleView = ScheduleView.MonthView;
            else
                CurrentScheduleView = ScheduleView.WeekView;
        }

Emil

  

Subburaj Pandian Veluchamy [Syncfusion]
Replied On November 17, 2016 01:07 PM UTC

Hi James/ Emil,

We have checked the mentioned issue with ScheduleAppointment has not added dynamically, appointment adding after updating/refreshing the ScheduleView. we have already fixed this issue could you please ensure with our latest update and no need to update the ScheduleView for this issue. This fix has also included in our volume 4 release 2016 which is expected to available by tomorrow. We will update you once the release has been rolled out.

Please let us know, if you have any query.

Regards,
Subburaj Pandian V 


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon

;