aspnet-devexpress-dot-web-dot-aspxgantt-dot-ganttmappings.md
Provides access to the task object’s mappings.
Namespace : DevExpress.Web.ASPxGantt
Assembly : DevExpress.Web.ASPxGantt.v25.2.dll
NuGet Package : DevExpress.Web
public GanttTaskMappingInfo Task { get; }
Public ReadOnly Property Task As GanttTaskMappingInfo
| Type | Description |
|---|---|
| GanttTaskMappingInfo |
Contains information on the mappings for the task object.
|
Run Demo: ASPxGantt - Data BindingRun Demo: MVCxGantt - Data Binding and Editing
Web Forms:
<dx:ASPxGantt ID="Gantt" runat="server" Width="100%" KeyFieldName="ID" ParentFieldName="ParentID" ...>
<Task Key="ID" ParentKey="ParentID" Title="Subject" Start="StartDate" End="EndDate" Progress="PercentComplete" />
...
</dx:ASPxGantt>
MVC:
@Html.DevExpress().Gantt(settings => {
settings.Name = "gantt";
...
settings.Mappings.Task.Key = "ID";
settings.Mappings.Task.ParentKey = "ParentID";
settings.Mappings.Task.Title = "Subject";
settings.Mappings.Task.Start = "StartDate";
settings.Mappings.Task.End = "EndDate";
settings.Mappings.Task.Progress = "PercentComplete";
...
}).Bind(
GanttDataProvider.Tasks,
GanttDataProvider.Dependencies,
GanttDataProvider.Resources,
GanttDataProvider.ResourceAssignments
).GetHtml()
See Also