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

RadScheduleViewCommands.EditAppointment.Execute

2 Answers 95 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 1
Joe asked on 04 Oct 2012, 04:42 PM
When I use RadScheduleViewCommands.EditAppointment.Execute to open an event that has a recurrence the recurrence dialog is not being presented.



How can I cause that dialog to be shown?

2 Answers, 1 is accepted

Sort by
0
Joe
Top achievements
Rank 1
answered on 04 Oct 2012, 06:20 PM
This is what ended up working for me.

Is this the best way to handle this?



public void EditAppointmentCommandExecuted(object parameter)

{

var scheduler = parameter as RadScheduleView;

if (!(scheduler.SelectedAppointment is Occurrence))

{

var sa = scheduler.SelectedAppointment as CalendarEventAppointment;

//have to copy to send in "Update" for the operation.

var ca = new CalendarEventAppointment();

ca.CopyFrom(sa);

ca.Operation = "Update";

RadScheduleViewCommands.EditAppointment.Execute(ca, scheduler);

}

else

{

//var occ = ca as Occurrence;

var occ = scheduler.SelectedAppointment as Occurrence;

scheduler.ShowRecurrenceChoiceDialogWindow(occ, RecurrenceChoiceDialogMode.Opening);

}

}

0
Konstantina
Telerik team
answered on 08 Oct 2012, 02:51 PM
Hello Craig,

I suppose this is fine, as far as I can understand what you are trying to achieve. However, you could also open the EditRecurrenceDialog using the RadScheduleViewCommands.EditRecurrenceRule() command instead.

Please let us know if you have further questions regarding our controls.

Kind regards,
Konstantina
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ScheduleView
Asked by
Joe
Top achievements
Rank 1
Answers by
Joe
Top achievements
Rank 1
Konstantina
Telerik team
Share this question
or