Back to Devexpress

GanttMappings.Dependency Property

aspnet-devexpress-dot-web-dot-aspxgantt-dot-ganttmappings-f4e776ea.md

latest2.3 KB
Original Source

GanttMappings.Dependency Property

Gives access to the dependency object’s mappings.

Namespace : DevExpress.Web.ASPxGantt

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

NuGet Package : DevExpress.Web

Declaration

csharp
public GanttTaskDependencyMappingInfo Dependency { get; }
vb
Public ReadOnly Property Dependency As GanttTaskDependencyMappingInfo

Property Value

TypeDescription
GanttTaskDependencyMappingInfo

Contains information on the mappings for the dependency 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" ...>
    <Dependency 
      Key="ID" 
      PredecessorKey="ParentID" 
      SuccessorKey="DependentID" 
      DependencyType="Type" />
    ...
</dx:ASPxGantt>

MVC:

cshtml
@Html.DevExpress().Gantt(settings => {
    ...
    settings.Mappings.Dependency.Key = "ID";
    settings.Mappings.Dependency.PredecessorKey = "ParentID";
    settings.Mappings.Dependency.SuccessorKey = "DependentID";
    settings.Mappings.Dependency.DependencyType = "Type";
    ...
}).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