Back to Devexpress

GanttMappings.ResourceAssignment Property

aspnet-devexpress-dot-web-dot-aspxgantt-dot-ganttmappings-9a17c4e9.md

latest2.5 KB
Original Source

GanttMappings.ResourceAssignment Property

Gives access to the resource assignment object’s mappings.

Namespace : DevExpress.Web.ASPxGantt

Assembly : DevExpress.Web.ASPxGantt.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public GanttTaskResourceAssignmentMappingInfo ResourceAssignment { get; }
vb
Public ReadOnly Property ResourceAssignment As GanttTaskResourceAssignmentMappingInfo

Property Value

TypeDescription
GanttTaskResourceAssignmentMappingInfo

Contains information on the mappings for the resource assignment object.

|

Remarks

Run Demo: ASPxGantt - Data BindingRun Demo: MVCxGantt - Data Binding and Editing

Web Forms:

aspx
<dx:ASPxGantt ID="Gantt" runat="server" Width="100%" KeyFieldName="ID" ParentFieldName="ParentID" ...>
    <Resource Key="ID" Name="Name" />
    <ResourceAssignment Key="ID" TaskKey="TaskID" ResourceKey="ResourceID" />
    ...
</dx:ASPxGantt>

MVC:

cshtml
@Html.DevExpress().Gantt(settings => {
    settings.Name = "gantt";
    ...
    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";
    ...
}).Bind(
    GanttDataProvider.Tasks, 
    GanttDataProvider.Dependencies, 
    GanttDataProvider.Resources, 
    GanttDataProvider.ResourceAssignments
).GetHtml()

Examples

See Also

ASPxGantt - 'How To' Examples

GanttMappings Class

GanttMappings Members

DevExpress.Web.ASPxGantt Namespace