Allow Delete Doesn't work?

3 posts, 0 answers
  1. Farshid
    Farshid avatar
    11 posts
    Member since:
    Apr 2012

    Posted 08 Apr 2012 Link to this post

    i created an appointment like below

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

    but i can delete it
    how i can create appointment that user can not delete it
  2. Sahand
    Sahand avatar
    7 posts
    Member since:
    Dec 2011

    Posted 08 Apr 2012 Link to this post

    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;
  3. Ivan Todorov
    Ivan Todorov avatar
    688 posts

    Posted 09 Apr 2012 Link to this post


    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.

    Ivan Todorov
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Back to Top