Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
  [Expand]Reporting
  [Expand]Chart Control
  [Expand]Grid View
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Image and Data Browsing
  [Expand]Docking and Popups
  [Expand]Site Navigation and Layout
  [Expand]File Management
  [Expand]Multi-Use Site Controls
  [Collapse]Scheduler
   [Expand]Product Information
    Getting Started
   [Collapse]Fundamentals
    [Collapse]Data Table Structure
      Microsoft SQL Server
      Collection of Custom Objects
      eXpress Persistent Objects (XPO)
      MS Access Database
     Product Class Structure
     Scheduling Basics
     iCalendar Support
   [Expand]Concepts
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]Examples
   [Expand]End-User Capabilities
   [Expand]Member Tables
  [Expand]HTML Editor
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gauges
  [Expand]Data Editors
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [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]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

Collection of Custom Objects

ASPxScheduler can be bound to a collection of custom objects. The following code demonstrates how to implement a custom appointment object.

Note

The collection of custom objects must implement the System.ComponentModel.IBindingList interface. An object exposing a simple System.Collections.IList interface can also be used as a data source, although you are advised against using List objects, since this approach may cause problems. For example, the IPersistentObject.GetRow method will return the System.Data.DataRowView instead of the original object.

Note

Do not implement a property in your custom object that returns a collection. You should implement a container class that has a property to get and set the collection and use this class in the corresponding custom object property instead.

Show Me

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

This code snippet implements the object data source used for binding to the ASPxScheduler. Note that while other properties of a custom object are mapped in the application to regular appointment properties, the Price and ContactInfo fields should be mapped to appointment's PersistentObject.CustomFields.

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