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

Edit/Delete Appointment command parameters

5 Answers 155 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Ben Lischner
Top achievements
Rank 1
Ben Lischner asked on 26 May 2011, 05:49 PM
Do the RadScheduleView commands for Edit and Delete Appointment (RadScheduleViewCommands.EditAppointment.Execute) support the recurrence choice UI dialogs like the RadScheduler does to allow you to select whether to edit/delete an occurrence or the series? If so, what parameter would need to be passed in?

5 Answers, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 31 May 2011, 08:53 AM
Hello Ben ,

You can use these commands to edit a single occurrence or a whole appointment by passing it as argument to the command.

By using the GetOccurrences method of appointment you can get the single occurrence of recurring appointment to edit/delete it. If you want to edit the whole appointment you have to pass the appointment as a parameter instead of single occurrence.

Example:

var occurence = appointment.GetOccurrences(DateTime.Today, DateTime.Today.AddDays(14));

RadSchedulerCommands.DeleteAppointment.Execute( occurence, radScheduleView );

Greetings,

Rosi
the Telerik team

 

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Ben Lischner
Top achievements
Rank 1
answered on 01 Jun 2011, 04:47 PM
Thanks! Now is there a way to get the occurrence or else the actual date of the appointment item clicked on? I have embedded a context menu in the AppointmentItem, but the AppointmentItemProxy that is available when the context menu is clicked only gives me the master appointment:

<DataTemplate x:Key="AppointmentItemTemplate">
    <Grid Background="Transparent">
        <telerik:RadWrapPanel Orientation="Horizontal" Margin="0 2 0 0" VerticalAlignment="Top">
             <TextBlock Text="{Binding Subject}" FontSize="9" TextWrapping="Wrap" />
        </telerik:RadWrapPanel>
        <telerik:RadContextMenu.ContextMenu>
            <telerik:RadContextMenu ItemClick="ContextMenu_ItemClick" Opened="ContextMenu_Opened" >
            </telerik:RadContextMenu>
        </telerik:RadContextMenu.ContextMenu>
    </Grid>
</DataTemplate>
0
Rosi
Telerik team
answered on 06 Jun 2011, 08:11 AM
Hello Ben,

The AppointmentItemProxy has public properties Start and End that you can use to get the actual date of the rendered appointment.

Regards,
Rosi
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Ben Lischner
Top achievements
Rank 1
answered on 06 Jun 2011, 04:00 PM
Thanks, not sure how I missed that. However, for non-exception occurrences of a recurring appointment the Start and End properties return the master appointment's start and end, not the occurence's.
0
Rosi
Telerik team
answered on 07 Jun 2011, 03:59 PM
Hi Ben,

This is a bug at our side that we will do our best to fix it for the upcoming Q2 release.

Regards,
Rosi
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ScheduleView
Asked by
Ben Lischner
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Ben Lischner
Top achievements
Rank 1
Share this question
or