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

Possible AllowDelete Bug

2 Answers 56 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 2
Stephen asked on 10 Jul 2012, 05:26 PM
Hello,

I have a custom appointment class where I am setting the AllowDelete property to false.
I have set up the mapping like so:
appointmentMappingInfo.AllowDelete = "AllowDelete"


When I only this appointment in the edit dialog, the "Delete" button is disabled as expected.

But, when I press the "Del" key on the RadScheduler itself, the AllowDelete is ignored and the appointment is deleted.

I have worked around it by checking for the AllowDelete state myself in the AppointmentDeleting event:
Private Sub ArcoriScheduler_AppointmentDeleting(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.SchedulerAppointmentCancelEventArgs) Handles Me.AppointmentDeleting
 
        If e.Appointment.AllowDelete Then
            ' The RadScheduler does not prompt for series or instance when deleting an appointment with recurrence,
            ' which is how Outlook behaves: http://www.telerik.com/support/pits.aspx#/public/winforms/11810
            If e.Appointment.MasterEvent IsNot Nothing Then
                Dim confirmDlg As New RecurringAppointmentDeleteDialog
                confirmDlg.AppointmentName = e.Appointment.Summary
                Dim result As DialogResult = confirmDlg.ShowDialog()
                If result = DialogResult.OK Then
                    If confirmDlg.DeleteType = RecurringAppointmentDeleteDialog.eDeleteType.Series Then
                        Me.Appointments.Remove(e.Appointment.MasterEvent)
                        e.Cancel = True
                    End If
                Else
                    e.Cancel = True
                End If
            End If
        Else
            e.Cancel = True
        End If


But this seems like a bug.

I have looked at the RadScheduler source code and can see no reference to AllowDelete in RadScheduler.cs.
I do see the AllowDelete handling in EditRecurrenceDialog.cs to disable the Delete button.


Thanks.

2 Answers, 1 is accepted

Sort by
0
Accepted
Ivan Todorov
Telerik team
answered on 12 Jul 2012, 02:19 PM
Hello John,

Thank you for contacting us.

We have had such an issue before, however I am glad to inform you that it has been addressed in our latest version (2012.2 608) as you can see in the release notes. Your account indicates that you are currently using the latest version. Can you confirm if this is correct? Also, if you are experiencing this issue with the latest version, can you please send us a sample project which demonstrates it. This will let us investigate it further and address it in a next release.

In case you are not using the latest version, the workaround you have found is correct and you can use it untill you upgrade.

Looking forward to hearing from you.

Kind regards,
Ivan Todorov
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
0
Stephen
Top achievements
Rank 2
answered on 12 Jul 2012, 04:40 PM
Hello,

I am still using the 2012 Q1 release so that explains it.

I didn't notice that it was fixed in Q2...even though I read the release notes.
I also initially didn't see the handling in the Q2 source code, but now that I've looked harder I do see the handling in ScheduleUIHelper::DeleteAppointment().


Thanks.
Tags
Scheduler and Reminder
Asked by
Stephen
Top achievements
Rank 2
Answers by
Ivan Todorov
Telerik team
Stephen
Top achievements
Rank 2
Share this question
or