Back to Devexpress

How to: Customize the Appointment Dialog using View Model API (simple customization)

aspnet-119729-components-scheduler-examples-customization-custom-form-and-custom-fields-how-to-customize-the-appointment-dialog-using-view-model-api-simple-customization.md

latest1.5 KB
Original Source

How to: Customize the Appointment Dialog using View Model API (simple customization)

  • Sep 29, 2023
  • 2 minutes to read

Note

The information in this topic applies to DevExpress ASP.NET Scheduler version 17.2 and later.

The View Model API enables you to customize dialog element characteristics (values, availability, and layout) as needed, without needing to override the ASPxScheduler‘s commands and copying the dialog form templates (UserControls) to your project.

This topic covers several common scenarios on how to customize the Appointment Dialog’s content and layout using the View Model API. In most cases, the ViewModel.PrepareControlFor and ViewModel.PrepareControl methods are used to access the Appointment Dialog editors.

The following code snippets illustrate how to customize editors on the form:

  • Replacing all Toggle editors with Check Boxes

  • Changing the “Start” and “End” editors’ DateTime format

  • Changing the “Resource” editor caption

  • Changing the “Subject” editor caption’s forecolor and font settings

  • Changing the “Description” editor’s forecolor and font settings.

  • Hiding the “Location” and “All-Day” editors

See Also

How to: Customize the Appointment Dialog using View Model API (working with custom fields)