[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
      How to: Create an Appointment for the Currently Selected Time Interval and Resource
    [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: Create an Appointment for the Currently Selected Time Interval and Resource

Before trying to create an appointment in code at runtime, make sure that the ASPxScheduler Control is bound to data, and all mappings for the appointments and resources are correct. To learn how the data binding task for the ASPxScheduler can be accomplished, refer to the following topics: How to: Bind an ASPxScheduler to MS SQL Server Database (Step-by-Step Guide) and How to: Bind ASPxScheduler Appointment to ObjectDataSource.

This example demonstrates how to create a new appointment for the time interval currently selected in the scheduler. It takes into account the resource which contains the selected time interval, and sets its Id to the appointment. The selected time interval is accessed via the ASPxScheduler.SelectedInterval property, and the selected resource is accessed via the ASPxScheduler.SelectedResource property. An appointment is added to the ASPxSchedulerStorage.Appointments collection of the scheduler's ASPxSchedulerDataWebControlBase.Storage.

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