Filter / Refresh Appointments

5 posts, 0 answers
  1. Jeff
    Jeff avatar
    48 posts
    Member since:
    Apr 2012

    Posted 26 Dec 2012 Link to this post

    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.
  2. Jeff
    Jeff avatar
    48 posts
    Member since:
    Apr 2012

    Posted 27 Dec 2012 Link to this post

    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?
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 28 Dec 2012 Link to this post

    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.
  5. Jeff
    Jeff avatar
    48 posts
    Member since:
    Apr 2012

    Posted 28 Dec 2012 Link to this post

    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. 
  6. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 03 Jan 2013 Link to this post

    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.
Back to Top
UI for WinForms is Visual Studio 2017 Ready