Back to Devexpress

Resource

aspnetmvc-401557-components-gantt-gantt-elements-resource.md

latest1.7 KB
Original Source

Resource

  • May 11, 2021

Note

Resources and resource assignments are optional in the Gantt extension.

Resources specify people responsible for tasks, equipment, materials, etc.

Use the following APIs to specify whether the Gantt hides resources or displays them as task labels:

Resource assignments specify which resources are assigned to tasks. You can assign multiple resources to a task.

The Gantt gets data for resources and resource assignments from separate data tables (Bind(Object, Object, Object, Object)). Use the GanttMappings.Resource and GanttMappings.ResourceAssignment objects to specify which fields in the data tables correspond to properties of the resource and resource assignment.

csharp
settings.Mappings.Resource.Key = "ID";
settings.Mappings.Resource.Name = "Name";

settings.Mappings.ResourceAssignment.Key = "ID";
settings.Mappings.ResourceAssignment.TaskKey = "TaskID";
settings.Mappings.ResourceAssignment.ResourceKey = "ResourceID";

Online Demos