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

Allow Delete Doesn't work?

2 Answers 92 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Farshid
Top achievements
Rank 1
Farshid asked on 08 Apr 2012, 06:50 AM
i created an appointment like below

Appointment app = new Telerik.WinControls.UI.Appointment(DateTime.Now, DateTime.Now);
app.AllowDelete = false;
radScheduler1.Appointments.Add(app);


but i can delete it
how i can create appointment that user can not delete it

2 Answers, 1 is accepted

Sort by
0
Sahand
Top achievements
Rank 1
answered on 08 Apr 2012, 08:27 PM
I am not sure if AllowDelete works fine or not.
As a workaround, you can use the AppointmentDeleting event of the scheduler:
private void radScheduler1_AppointmentDeleting(object sender, SchedulerAppointmentCancelEventArgs e)
        {
            if (e.Appointment.AllowDelete == false)
                e.Cancel = true;
        }
0
Ivan Todorov
Telerik team
answered on 09 Apr 2012, 12:31 PM
Hello,

I am writing to confirm that this is an issue in RadScheduler. Currently, setting the AllowDelete property to false only disables the Delete button on the EditAppointmentDialog, but the user is still able to delete the appointment with the Delete key. I have logged this to our Public Issue Tracking System. Here you can find the PITS entry. We will address this in a next release.

The workaround that Sahand suggested is correct so you can use it for the time being. Thank you Sahand, for the community effort.

I have updated the Telerik points of both of you.

Should you have any additional questions, feel free to write back.

Greetings,
Ivan Todorov
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Tags
Scheduler and Reminder
Asked by
Farshid
Top achievements
Rank 1
Answers by
Sahand
Top achievements
Rank 1
Ivan Todorov
Telerik team
Share this question
or