Reminders to be shown for set resources in group view

2 posts, 0 answers
  1. Amitesh
    Amitesh avatar
    5 posts
    Member since:
    Aug 2010

    Posted 05 Jan 2015 Link to this post

    Hi

    When using group view we need the reminders to be shown for a selected (set programitically) resource. At the moment it shows reminders for all resources that have appointments that need reminding. In our case we have users who have scheduler open in group view showing multiple resources but would only like to be reminded about appointments that are for the user using the system.

  2. Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 06 Jan 2015 Link to this post

    Hello Amitesh,

    Thank you for writing back.

    To achieve the desired functionality you can remove the remind objects from the scheduler reminder for the appointments you do not want to be reminded. In addition you should perform the same action when an appointment is added. Please note that in this case you should do this in the CollectionChanged event and you need to subscribe to this event after the reminder is associated with the scheduler:
    RadSchedulerReminder schedulerReminder = new RadSchedulerReminder();
     
    public Form1()
    {
        InitializeComponent();
     
        schedulerReminder.AssociatedScheduler = this.radScheduler1;
        radScheduler1.Appointments.CollectionChanged += Appointments_CollectionChanged;
        schedulerReminder.StartReminder();
     
        var reminders = schedulerReminder.GetRemindObjects();
        foreach (Appointment item in reminders)
        {
            if (item.ResourceId != this.radScheduler1.Resources[0].Id)
            {
                schedulerReminder.RemoveRemindObject(item);
            }
        }
    }
     
    void Appointments_CollectionChanged(object sender, Telerik.WinControls.Data.NotifyCollectionChangedEventArgs e)
    {
        if (e.Action == Telerik.WinControls.Data.NotifyCollectionChangedAction.Add)
        {
            var reminders = schedulerReminder.GetRemindObjects();
            foreach (Appointment item in reminders)
            {
                if (item.ResourceId != this.radScheduler1.Resources[0].Id)
                {
                    schedulerReminder.RemoveRemindObject(item);
                }
            }
        }
    }

    I hope this helps. Should you have any other questions do not hesitate to ask.
     
    Regards,
    Dimitar
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top