Hello wang zhong,
Thank you for contacting us.
To cancel the deletion of an appointment you will have to do the following:
1. Create a Custom Appointment
with boolean property, for example CanDelete
2. To stop the executing of the delete Command use the following code:
a, ExecutedRoutedEventArgs e)
(e.Command == RadSchedulerCommands.DeleteAppointment)
var app = ((Occurrence)e.Parameter).Appointment;
3. Then to hide the X button you have 2 options:
a) create and apply a custom theme
to the Scheduler. The explanation applies for Silverlight too. Then using a Converter
to manipulate the visibility of the Delete button.
You can find information how a Converter
is created and applied here:
b) to use the AppointmentTemplateSelector
property and customize the appointment
without the delete button. I happened to have a ready project illustrating the use of TimeSlotTemplateSelector
. Attached I am sending it to you as the logic is pretty much the same. The only different thing is that the AppointmentTemplateSelector returns AppointmentSlot
and to remove the button you will need to parse it to an AppointmentItem
. Once you have the AppointmentItem it contains the PART_DeleteButton
control and you can remove it.
If you need further assistance please feel free to contact us again.
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.