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

Refresh Scheduler and Display new values

Hello,

I am trying to display random appointments on Refresh button click. But display is not correct.
PFA

I tried to clear scheduler with following code but facing still problem

             if (ResourceCollection != null)
            {
                instance.ResourceCollection.Clear();
                ResourceCollection.Add(instance);
            }

            var apps = this.Schedule1.Appointments;
            var res = this.Schedule1.Resource;

            for (int j = 0; j < res.Length; j++)
            {
                Schedule1.Resource.Remove(j);
            }
            for (int i = 0; i < apps.Count; i++)
            {
             Schedule1.Appointments.Remove(apps[i]);
             }



Attachment: SchedulerDisplay_7d66b495.rar

5 Replies

JO Joy Oyiess Rex  K Syncfusion Team February 26, 2014 10:01 AM UTC

Hi Muhammad,

 

Thanks for your interest in Syncfusion products.

 

Based on the current implementation of Schedule, “ScheduleResourceTypeCollection” property of schedule’s collection change will not be listened, instead you need to set the value to this property instead of clearing and adding the items in it. For that please refer the below forum,

 

Forum Link : http://www.syncfusion.com/support/forums/winrt/sfschedule/114704

 

We have analysed your requirement based on the given data, and we have prepared a simple sample for the same, please find the sample in the attachment.

 

In the provided sample, we have achieved your requirement by using the below code snippet,

 

Code Snippet:

  [c#]

 

            //To remove the resource

            this.schedule1.Resource = string.Empty;

 

           

            //To Clear the Appointments

            this.schedule1.Appointments.Clear();

   

            

            //To reset the Resource Collection

            this.schedule1.ScheduleResourceTypeCollection = ResourceCollection;

            this.schedule1.Resource = "Coder";  //To reset new Resource.

 

 

 

If the provided solution doesn’t meet your requirement, please revert us back with more information about your requirement, or modify the provided sample based on it, to reproduce the issue, so that we could analyse on it and provide you possible solution.

 

Regards,

Joy Oyiess Rex K


Attachment: RefreshResource_SfSchedule_WinRT_e2d8cdc1.zip


MM Muhammad Mobeen February 27, 2014 05:13 AM UTC

Hello,

Thanks for your guidance.
But your code is not clear all appointments.
PFA

I repeated three cycles to clear appointments and found this.

Clear Resource -> Clear Appointment -> Reset Resource -> Clear Resource  so on

thanks


Attachment: RefreshAppointment_58f4ee92.rar


JO Joy Oyiess Rex  K Syncfusion Team February 27, 2014 12:08 PM UTC

Hi Muhammad,

 

Thanks for your update.

 

We are not able to reproduce the mentioned issue with our current version, as per the provided replication procedure. So could you please provide us, assembly version details in which you are using our Schedule control, so that we could analyse on it and provide you better solution.

 

Please let us know, if you have any concerns.

 

Regards,

Joy Oyiess Rex K



HP Hiren Patel March 14, 2016 09:42 AM UTC

just wrote below tow line

 Schedule1.DataSource = null;
 Schedule1.DataBind();


VR Vigneshkumar Ramasamy Syncfusion Team March 15, 2016 08:37 AM UTC

Hi Hiren,

We are unable to reproduce the mentioned issue with the given information. Please provide more information or else provide a simple sample which replicates the issue. It would be helpful to provide a prompt solution.

Regards

Vigneshkumar R.


Loader.
Live Chat Icon For mobile
Up arrow icon