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.

Refresh Schedule Control View after appointment addiction.

Thread ID:

Created:

Updated:

Platform:

Replies:

118894 Apr 21,2015 04:56 AM Aug 24,2017 04:40 AM Windows Forms 9
loading
Tags: ScheduleControl
Mauro Moro
Asked On April 21, 2015 04:56 AM

Hi there,
my name's Mauro and I'm a new user of Syncfusion suite. I'm sure you have answered, in a way or another, to this question but I didn't find what I'm looking for.
The question is:
I add a new appointment every x minutes to a schedule control, reading the parameters from emails (I have just implemented the parsing mode to suite my needs) and creating a new SimpleScheduleAppointment object.
But after this addiction I cannot refresh the schedule view and cannot see the new appointments without close and reopen the form.

Thx in advance.

Mauro


Anish George [Syncfusion]
Replied On April 23, 2015 01:01 AM

Hi Mauro,

Thank you for your interest in Syncfusion products.

We suggest you to use the Refresh method for reloading the schedule grid. Please refer the below code snippet.

C#:

this.scheduleControl1.Refresh();

We also suggest you to look into our UG and KB articles for more information related to our Schedule Control.

UG:
http://help.syncfusion.com/ug/windows%20forms/index.html#!Documents/overview18.htm

KB:
http://www.syncfusion.com/forums/windowsforms

Please let us know if you need any further assistance.

Regards,
Anish


Mauro Moro
Replied On April 23, 2015 03:41 AM

Hi Anish and thx for your help.
I explain what I need to do: every x minutes I want to check an email box and if there is a new email, I'm going to import it and, after a parsing method, i want to insert the result as property of appointment object.
The fact is I don't pass throught an appointment form and it's methods.
I can save the appointment but after a appointment addiction I need to exit the program and reload the source to see the result.

Could you pls show me where to put the Refresh() method, I mean in which schedule control event should I put the refresh method??

Regards
Mauro


Anish George [Syncfusion]
Replied On April 24, 2015 06:25 AM

Hi Mauro,

Thank you for your update.

We would like to let you know that there is no particular event to get fired whenever you change the datasource in the backend. Because, the schedule control will not recognize the changes that are made in the backed datasource unless and until it is reinitialized. We suggest you to manually assign the datasource in a button click event or timer event. We suggest you to use the timer event in such a way that it gets fired in a particular time interval. Along with the refresh method, you also need to assign the datasource again for the particular schedule control which you are using. Please refer the following code example :

C#:

Timer timer = new Timer();

timer.Interval = 300000;

timer.Tick += new EventHandler(timer_Tick);

void timer_Tick(object sender, EventArgs e)

{

this.scheduleControl1.DataSource = datasource; // re-assign the datasource.

this.scheduleControl1.Refresh();

}

Please let us know if you need any further assistance.

Regards,
Anish


Mauro Moro
Replied On April 24, 2015 10:01 AM

Thank you very much.
That was exactly what I was searching for!!

Regards
Mauro

Saranya CJ [Syncfusion]
Replied On April 27, 2015 07:02 AM

Hi Mauro,

Thank you for your update. We are glad to know that your reported issue have been resolved. Please let us know if you require any other assistance on this.

Regards,
Saranya

Raul
Replied On August 22, 2017 12:01 PM

Hi.

In my project, I have added a new appointment and save it in database in scheduleControl_ScheduleAppointmentClick event. In the same event, in last line of code, I have wrote :

scheduleControl.Refresh() 

that should reload all my appointment data but nothing occurs.

Can someone help me?

Thanks in advance

Raul


Mohanraj Gunasekaran [Syncfusion]
Replied On August 23, 2017 08:14 AM

Hi Raul,  
 
Thanks for using Syncfusion product.  
 
In order to reload your all appointment, SetDataToDayPanels can be used. Please refer to the below code example,  
 
Code example  
this.scheduleControl1.GetScheduleHost().SetDataToDayPanels();  
  
Sample link: ScheduleControl  
  
Note: If you want to use the GetScheduleHost().SetDataToDayPanels method, you should add the Syncfusion.Grid.Windows dll in your project reference. Please refer the below screenshot,  
  
Screenshot  
  
  
Regards,  
Mohanraj G  
 


Raul
Replied On August 23, 2017 08:49 AM

Thanks for your help

I have found the solution to my problem by the next line of code:

scheduleControl1.ResetProvider(ScheduleViewType.WorkWeek);





Mohanraj Gunasekaran [Syncfusion]
Replied On August 24, 2017 04:40 AM

Hi Raul,  
 
Thanks for your update. 
 
Yes, you can also use the ResetProvider method to update schedule control appointments. Anyway, we are glad to know that your reported problem has resolved. 
 
Please let us know, if you have any concerns. 
 
Regards, 
Mohanraj G 


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.

;