[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Grid View
  [Expand]Tree List
  [Expand]Card View
  [Expand]Chart Control
  [Expand]Pivot Grid
  [Expand]Rich Text Editor
   [Expand]Product Information
    Getting Started
   [Expand]Scheduler Elements
   [Expand]Visual Elements
   [Expand]Design-Time Features
    [Expand]Data Binding
     [Collapse]Custom Forms and Custom Fields
       How to: Customize Appointment Appearance via Templates
       How to: Customize a Form Using Templates
       How to: Customize the Appointment Editing Form for Working with Custom Fields
       How to: Customize the Appointment Dialog using View Model API (simple customization)
       How to: Customize the Appointment Dialog using View Model API (working with custom fields)
    [Expand]Printing and Reporting
   [Expand]End-User Capabilities
   [Expand]Member Tables
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

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


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.

Online Example

A complete sample project demonstrating this approach in action is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T577307

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

Expanded See Also

Is this topic helpful?​​​​​​​