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

RecurenceParent is not visible, children are

1 Answer 34 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Kevin Kembel
Top achievements
Rank 1
Kevin Kembel asked on 27 Sep 2011, 01:26 AM
In my implementation, I have some parent appointments that are visible=false.  This is because the parent may belong to another user (not visible), and the single occurrence of an appointment is moved to the current user (current user's appointments are visible).

Originally, I did not include any appointments that were not of the current user, but this meant that the current user could not edit the single occurrence of their appointment, because it happened to be part of a series that originally belonged to another user.

Now, my scheduler loads in all appointments for the current user, and also includes any parent appointments, and sets parent appointments that belong to other users to visible=false.

This seemed to be working, except that the parent has a 'RecurrenceRule', so the scheduler automatically parses the rule and builds the recurring appointments.  The recurring appointments are visible, even though the parent is visible=false.  How can I force the parsed recurring appointments to be visible=false?

I tried setting the parent RecurrenceRule to null in AppointmentDataBound, and that prevents the recurring appointments for other users from being generated, but when you delete the current user's single occurrence, it throws an exception that the scheduler could not parse the parent RecurrenceRule (not surprisingly since I manually removed it).

Any ideas?

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 29 Sep 2011, 01:25 PM
Hello Kevin,

You can try to do a validation similar to this in the Appointment DataBound event:
protected void RadScheduler1_AppointmentDataBound(object sender, SchedulerEventArgs e)
   {
       if (e.Appointment.RecurrenceState!=RecurrenceState.NotRecurring)
       {
           e.Appointment.Visible = false;
       }
   }

This code hides all the recurring appointments at my side.

hope this will be helpful.

Greetings,
Plamen Zdravkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Scheduler
Asked by
Kevin Kembel
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or