Minutely Recurrence Pattern in RadScheduler
Environment
Product Version | 2021.3.914 |
Product | RadScheduler for WinForms |
Description
When the recurrence dialog is open, the dialog provides the following recurrence patterns: Hourly, Daily, Weekly, Monthly, Yearly. This KB article demonstrates how we can add a minutely recurrent pattern. The custom class needs to implement IRecurrenceRuleSettingsControl interface.
Solution
Create a custom UserControl which will hold the options to set the minutes. In the following example, we will the same structure of the Hourly UserControl which contains one RadSpinEditor and two labels.
Custom UserControl
The next part is to create custom EditRecurrenceDialog in which we are going to add a new RadRadioButton and set the UserControl related to it. To show the custom UserControl we need to subscribe to the ToggleChanged event of the control and call the ShowRecurrenceSettingsControl() which will hide the previous one and show the new content. The rest of the radio buttons need to be re-arranged to make space for the Minutely RadRadioButton.
What's left to do is to replace the default EditRecurrenceDialog with our custom dialog inside the RecurrenceEditDialogShowing event handler of the RadScheduler control.