Current filter:
                                You should refresh the page.

                                1 Solution

                                Creation Date Importance Sort by

                                Hi Hedi,

                                In a standalone WinForms Scheduler control, you can show your custom dialog in the SchedulerControl.DeleteRecurrentAppointmentFormShowing event handler, for example:

                                [VB.NET]
                                Private Sub SchedulerControl_DeleteRecurrentAppointmentFormShowing(ByVal sender As Object, ByVal e As DeleteRecurrentAppointmentFormEventArgs) Dim res = XtraMessageBox.Show("Delete occurences?", "Delete", MessageBoxButtons.YesNo) If res = DialogResult.Yes Then e.DialogResult = DialogResult.OK Else e.DialogResult = DialogResult.Cancel End If e.QueryResult = RecurrentAppointmentAction.Occurrence e.Handled = True End Sub

                                The XAF Scheduler module handles appointment deleting and shows its own confirmation message when a user deletes an appointment. Obtain a SchedulerListViewControllerBase controller instance and call its SuppressConfirmationShowing method to disable this.

                                [VB.NET]
                                Dim controller = Frame.GetController(Of SchedulerListViewControllerBase)() controller.SuppressConfirmationShowing()
                                • Hedi Guizani 09.12.2019

                                  indeed the confirmation is gone but now
                                  the series are deleted and I couldn't figure out how to set it to delete only occurences

                                  I have tryed :

                                  [VB.NET]
                                  Private Sub SchedulerControl_DeleteRecurrentAppointmentFormShowing(sender As Object, e As DeleteRecurrentAppointmentFormEventArgs) If DevExpress.XtraEditors.XtraMessageBox.Show("Delete?", "Deleted Occurences.", System.Windows.Forms.MessageBoxButtons.YesNo, System.Windows.Forms.MessageBoxIcon.Question) = System.Windows.Forms.DialogResult.Yes Then e.QueryResult = RecurrentAppointmentAction.Occurrence e.DialogResult = System.Windows.Forms.DialogResult.OK Else e.QueryResult = RecurrentAppointmentAction.Cancel e.DialogResult = System.Windows.Forms.DialogResult.Cancel End If e.Handled = True End Sub

                                  Can you help please

                                • Gosha (DevExpress Support) 09.13.2019

                                  Hi Hedi,

                                  Use the following controller instead of my solution above to achieve this functionality.

                                  [VB.NET]
                                  Imports DevExpress.ExpressApp.Scheduler Imports DevExpress.ExpressApp.Scheduler.Win Public Class MySchedulerListViewController Inherits SchedulerListViewController Public Sub New() MyBase.New() SuppressConfirmationShowing() End Sub Protected Overrides Sub OnDeleting(selectedObjects As IList) Dim deleteHelper = DirectCast(SchedulerEditor.SchedulerDeleteHelper, SchedulerDeleteHelperWin) AddHandler deleteHelper.OccurrenceDeleting, AddressOf OccurrenceDeleting deleteHelper.StartProcessing(selectedObjects, ObjectSpace) Refill(selectedObjects, deleteHelper.GetObjectsToDelete()) End Sub Private Sub OccurrenceDeleting(ByVal sender As Object, ByVal e As DeleteResultEventArgs) Dim deleteHelper = DirectCast(sender, SchedulerDeleteHelperWin) RemoveHandler deleteHelper.OccurrenceDeleting, AddressOf OccurrenceDeleting e.Handled = True If DevExpress.XtraEditors.XtraMessageBox.Show("Delete?", "Deleted Occurences.", System.Windows.Forms.MessageBoxButtons.YesNo, System.Windows.Forms.MessageBoxIcon.Question) = System.Windows.Forms.DialogResult.Yes Then e.DeleteResult = DeleteResult.Occurrence Else e.DeleteResult = DeleteResult.Cancel End If End Sub End Class
                                • Hedi Guizani 09.16.2019

                                  Thank you for the great support
                                  Could you please delete the github link and make the tiket public, for the community.

                                • Gosha (DevExpress Support) 09.17.2019

                                  Hi Hedi,

                                  I deleted the ink to your project and made this ticket public. Thank you for your collaboration.