This is a migrated thread and some comments may be shown as answers.

Filter / Refresh Appointments

4 Answers 155 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 27 Dec 2012, 05:39 AM
My project contains several parameters that can be used to filter the displayed appointments. 
Examples are:
1. Guest Name
2. Employee Name
3. Appointment Category (Spa, Sports, etc.)
4. Location (Spa room 1, Tennis Court 1, Stable 1, etc.)
5. Appointment Type (massage, tennis, horse back riding, etc.)

I would like to provide a combobox for each parameter and allow the user to select the filters. Is there a method, similar to filtering a bindingsource?

Also, Is there any method to refresh the appointments? If computer 1 is displaying the scheduler and a new appointment is made at computer 2, I would like computer 1 to be able to click a "refresh" button and see the changes to the database.

4 Answers, 1 is accepted

Sort by
0
Jeff
Top achievements
Rank 1
answered on 27 Dec 2012, 09:20 PM
I have some additional information about Refreshing.

I thought that tableadapter.fill wasn't working because when my custom form saves, it calls a public sub on the scheduler form to perform a fill. Nothing happens in the view even though tableadapter.fill returns the correct number of items. I created a button to refresh that calls the same sub and it works.

This is what is happening: When the sub is called by another form or by a timer on the same form, the RadScheduler doesn't refresh. When the sub is called by a button click the RadScheduler updates properly. In both cases tableadapter.fill returns the correct number if items.

Any idea what I'm missing?
0
Jack
Telerik team
answered on 28 Dec 2012, 02:42 PM
Hi Jeff,

Directly to your questions:

1. There is no built-in filtering functionality in RadScheduler for filtering appointments. You can do this by setting the Appointment.Visible property explicitly.

2. You can use the Refresh method of RadShedulerElement in order to sync appointments after calling the Fill method of your table adapter:
radScheduler1.SchedulerElement.Refresh();

3. I am not sure why the Fill method is not working in your scenario. Please, could you open a support ticket and send us your application. We will investigate the issue in detail and we will try to find a proper solution.

I am looking forward to your reply.
 
All the best,
Jack
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
0
Jeff
Top achievements
Rank 1
answered on 28 Dec 2012, 08:17 PM
Thanks for the response. I think it might have something to do with the form being an MDI child. I am able to perform the fill by passing a variable that tells it that it's time to refresh as long as it's in a mouse or button event. The timer initiates the fill but nothing happens. At this point, though, I am satisfied. 

If anyone else has this problem, I solved it like this:
Parent form as variable NeedsRefresh as Boolean
Scheduler form has public sub RefreshMe that sets parent.NeedsRefresh = true
Custom appointment form calls SchedulerForm.RefreshMe in its own Form.Closed sub
Scheduler form checks the value of Parent.NeedsRefresh in its RadScheduler.MouseMove sub and when true, it performs the fill. 

I don't know why a timer wouldn't do it or why simply placing the fill in a public sub wouldn't work. 
0
Peter
Telerik team
answered on 03 Jan 2013, 08:10 AM
Hello Jeff,

I am happy that you managed to resolve your issue with the refresh and thank you for sharing the solution with the community.

In order to debug the issue with the Timer in a pubic sub we will need a sample project that will give an insight view of your scenario.

Let us know if you have any other questions.

Regards,
Peter
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
Tags
Scheduler and Reminder
Asked by
Jeff
Top achievements
Rank 1
Answers by
Jeff
Top achievements
Rank 1
Jack
Telerik team
Peter
Telerik team
Share this question
or