All docs
V21.1
21.2 (EAP/Beta)
21.1
20.2
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

GanttMappingInfoBase.Key Property

Specifies an object’s unique identifier.

Namespace: DevExpress.Web.ASPxGantt

Assembly: DevExpress.Web.ASPxGantt.v21.1.dll

Declaration

[DefaultValue("ID")]
public string Key { get; set; }

Property Value

Type Default Description
String

“ID”

A unique identifier.

Remarks

Run Demo: ASPxGantt - Data Binding Run 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()

Examples

See Also