Skip to main content
A newer version of this page is available. .

GanttSettings.Mappings Property

Provides access to the object that contains a set of gantt’s properties mappings.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v19.1.dll

Declaration

public ASPxGanttMappings Mappings { get; }

Property Value

Type Description
ASPxGanttMappings

Provides functionality for mapping properties to appropriate data fields.

Remarks

Mappings specify what field in a data source corresponds to an object’s task, dependency or resource property.

@Html.DevExpress().Gantt(settings => {
    settings.Name = "gantt";
    settings.CallbackRouteValues = new { Controller = "Gantt", Action = "FeaturesPartial" };
    settings.Width = Unit.Percentage(100);
    ...
    settings.Mappings.Task.ID = "ID";
    settings.Mappings.Task.ParentID = "ParentID";
    settings.Mappings.Task.Title = "Subject";
    settings.Mappings.Task.Start = "StartDate";
    settings.Mappings.Task.End = "EndDate";
    settings.Mappings.Task.Progress = "PercentComplete";

    settings.Mappings.Dependency.ID = "ID";
    settings.Mappings.Dependency.PredecessorID = "ParentID";
    settings.Mappings.Dependency.SuccessorID = "DependentID";
    settings.Mappings.Dependency.DependencyType = "Type";

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

    settings.Mappings.ResourceAssignment.ID = "ID";
    settings.Mappings.ResourceAssignment.TaskID = "TaskID";
    settings.Mappings.ResourceAssignment.ResourceID = "ResourceID";
    ...
}).Bind(GanttDataProvider.Tasks, GanttDataProvider.Dependencies, GanttDataProvider.Resources, GanttDataProvider.ResourceAssignments).GetHtml()

Online Demos

See Also