Possible AllowDelete Bug

3 posts, 1 answers
  1. Stephen
    Stephen avatar
    86 posts
    Member since:
    Jan 2011

    Posted 10 Jul 2012 Link to this post

    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. Answer
    Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 12 Jul 2012 Link to this post

    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 >>
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Stephen
    Stephen avatar
    86 posts
    Member since:
    Jan 2011

    Posted 12 Jul 2012 Link to this post

    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.
Back to Top