Files to look at:

How to Use the Gantt Control to Display a List of Tasks in XAF WinForms Apps

Scenario

This example demonstrates the simplest integration solution for the Gantt Control in XAF. Gantt will display a list of business objects (tasks) as a project schedule: image

Implementation Steps

Step 1. Add the GanttSolution.Module/BusinessObjects/ITask.cs file to your YourSolutionName.Module project. Implement the GanttSolution.Module.BusinessObjects.ITask interface in the business class that will be a task record in the Gantt Control data source (research GanttSolution.Module.BusinessObjects.Task.cs for details).

Step 2. Add the following files to the YourSolutionName.Module.Win project and build your solution:

  • GanttSolution.Module.Win\Controllers\RibbonCustomizationWindowController.cs
  • GanttSolution.Module.Win\Editors\CustomGanttEditor.cs

For more information on custom List Editors and related customization scenarios, see List Editors | How to: Access the List Editor's Control.

Step 3. Invoke the Model Editor for the YourSolutionName.Module.Win project, navigate to the Views | YourTaskClass_ListView node and set EditorType to GanttSolution.Module.Win.Editors.CustomGanttEditor. For more information, see Customize List Editors.

NOTE: This example is not a complete solution. Thoroughly test, extend and modify its code to meet your business requirements.