[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Collapse]Gantt Control
   [Expand]Getting Started
   [Collapse]Bind to Data
     Bind to Hierarchical Data
     Bind to Self-Reference Data
     Bind Columns to Data Source Fields
     Mappings
   [Expand]Data Editing and Validation
    Item Types
    Task Dependencies
    Working and Non-Working Time Ranges
    Strip Lines
   [Expand]Visual Elements
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Mappings

When you bind the GanttControl to a data source, you need to map the GanttNode properties to data source fields.

In real-world applications, the names of the database fields are usually fixed, and you cannot change them. Mappings are used to adjust the GanttControl data model to the existing data model.

Mapping Data Type Description
GanttView.NameMapping System.String Maps to the GanttNode.Name property. Provides a path to a data field that stores the task's name.
GanttView.ProgressMapping System.Double Maps to the GanttNode.Progress property. Provides a path to a data field that stores the task's progress.
GanttView.StartDateMapping System.DateTime Maps to the GanttNode.StartDate property. Provides a path to a data field that stores the task's start date.
GanttView.FinishDateMapping System.DateTime Maps to the GanttNode.FinishDate property. Provides a path to a data field that stores the task's finish data.
GanttView.DurationMapping System.TimeSpan Maps to the GanttNode.Duration property. Provides a path to a data field that stores the task's duration.
GanttView.BaselineStartDateMapping System.DateTime Maps to the GanttNode.BaselineStartDate property. Provides a path to a data field that stores the task baseline's start date.
GanttView.BaselineFinishDateMapping System.DateTime Maps to the GanttNode.BaselineFinishDate property. Provides a path to a data field that stores the task baseline's finish date.
GanttView.BaselineDurationMapping System.TimeSpan Maps to the GanttNode.BaselineDuration property. Provides a path to a data field that stores the task baseline's duration.

The code sample below demonstrates how to specify mappings.

Tip

You have no need to specify mappings when the GanttControl is bound to a collection of GanttTask objects.

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