[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Collapse]Scheduler
   [Expand]Product Information
    Getting Started
   [Expand]Scheduler Elements and Structure
   [Expand]Data Binding
   [Expand]Appointments
   [Expand]Views
   [Expand]Import and Export
    Printing
   [Expand]Scheduler Reporting
   [Expand]Time Zones
   [Expand]Design-Time Features
   [Expand]End-User Capabilities
   [Expand]Services
   [Expand]Member Tables
   [Expand]Visual Elements
   [Collapse]Examples
    [Expand]Appearance
    [Expand]Data Binding
    [Expand]Data Exchange
    [Expand]DateTime
    [Expand]DateNavigator
    [Expand]Forms
    [Collapse]Gantt View
      How to: Create a Gantt Chart Application
      How to: Implement Dependency Constraints in the Gantt View
    [Expand]Initialization
    [Expand]Labels and Statuses
    [Expand]Layout
    [Expand]Menu
    [Expand]Printing and Reporting
    [Expand]Protection
    [Expand]Range Control
    [Expand]Recurrence
    [Expand]Reminders
    [Expand]Selection
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[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]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)

How to: Implement Dependency Constraints in the Gantt View

This code snippet illustrates how to apply the AppointmentDependencyType.FinishToStart dependency restrictions on modifications of appointment Appointment.Start and Appointment.End values within the Gantt View.

The SchedulerOptionsCustomization.AllowAppointmentConflicts option of the Scheduler is set to AppointmentConflictsMode.Custom. It allows the SchedulerControl to raise the SchedulerControl.AllowAppointmentConflicts event.

The code within this event handler analyzes all dependencies of the specified (Finish-to-Start) type established with the appointment for which the event is raised. If Start or End properties of the modified appointment do not meet criteria, it is thought that a conflict occurs.

If a conflict occurs, appointment modifications are canceled automatically.

Show Me

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

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