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

Reminders to be shown for set resources in group view

1 Answer 16 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Amitesh
Top achievements
Rank 2
Amitesh asked on 05 Jan 2015, 08:24 PM

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.

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 06 Jan 2015, 03:37 PM
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.

 
Tags
Scheduler and Reminder
Asked by
Amitesh
Top achievements
Rank 2
Answers by
Dimitar
Telerik team
Share this question
or