Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Collapse]Scheduler
   [Expand]Product Information
   [Expand]Getting Started
   [Expand]Fundamentals
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Collapse]Examples
    [Expand]Appearance
    [Expand]Data Binding
    [Expand]Data Exchange
    [Expand]DateTime
    [Expand]DateNavigator
    [Collapse]Forms
      How to: Create a Custom Appointment Recurrence Form (Method 1)
      How to: Create a Custom Appointment Recurrence Form (Method 2)
    [Expand]Gantt View
    [Expand]Initialization
    [Expand]Labels and Statuses
    [Expand]Layout
    [Expand]Menu
    [Expand]Printing and Reporting
    [Expand]Protection
    [Expand]Range Control
    [Expand]Recurrence
    [Expand]Reminders
    [Expand]Selection
   [Expand]End-User Capabilities
   [Expand]Member Tables
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Create a Custom Appointment Recurrence Form (Method 2)

This document describes how to create a custom form and replace the standard appointment recurrence editing form with a newly created form. Method 2 uses the System.Windows.Forms.Form and the AppointmentFormController.

To create a custom form, add a new form to the project and name it MyAppointmentRecurrentForm.

There are six recurrence types (refer to the RecurrenceType topic) and four ready-to-use recurrent controls suitable for most situations. To add required controls to the form, perform the following steps:

  1. Select the GroupControl in the Toolbox and drop it onto the MyAppointmentRecurrentForm. Change its visibility to false.
  2. Drag the DailyRecurrenceControl from the Toolbox and drop it on the GroupControl. Place it over the previous control. Change its visibility to false.
  3. Drag the WeeklyRecurrenceControl from the Toolbox and drop it on the GroupControl. Place it over the previous control. Change its visibility to false.
  4. Drag the MonthlyRecurrenceControl from the Toolbox and drop it on the GroupControl. Place it over the previous control. Change its visibility to false.
  5. Drag the YearlyRecurrenceControl from the Toolbox and drop it on the GroupControl. Place it over the previous control. Change its visibility to false.
  6. Select the RadioGroup control in the Toolbox and drop it on the form. Add four items to the control with the RadioGroupItem.Description values set to Daily, Weekly, Monthly and Yearly. Specify these strings as the RadioGroupItem.Value property values.
  7. Add OK and Cancel buttons.

The form will look like that shown in the following picture.

Add the code to the code behind file as illustrated in the following example.

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T222451.

The code below is an example of the custom recurrent appointment editing form. Invoke it for recurring appointments. This form allows changing recurrence options only. To change start/end times and durations, add other controls to the form.

Handle the SchedulerControl.EditAppointmentFormShowing event to invoke a custom form instead of the default AppointmentForm.

Some comments are given below to clarify the interaction logic.

How would you rate this topic?​​​​​​​