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

GanttView.NameMapping Property

Provides a path to a data field that stores the task’s name. This is a dependency property.

Namespace: DevExpress.Xpf.Gantt

Assembly: DevExpress.Xpf.Gantt.v19.1.dll

Declaration

public Mapping NameMapping { get; set; }

Property Value

Type Description
Mapping

A Mapping object indicating the data field and the converter.

Remarks

Use the NameMapping property to bind the gantt item’s GanttNode.Name property to a data field. The data field is obtained from the data source specified by the GanttControl’s ItemsSource property.

Tip

Use the Mapping.Converter property to register a value converter for a custom storing format.

You can specify mapping as a Mapping markup extension object, or as a string. The code sample below illustrates how to map gantt items’ properties to data source fields.

<dxgn:GanttControl ItemsSource="{Binding Tasks}">
    ...
    <dxgn:GanttControl.View>
        <dxgn:GanttView
            KeyFieldName="Id"
            ParentFieldName="ParentId"

            NameMapping="{dxgn:Mapping Name}"
            StartDateMapping="StartDate"
            FinishDateMapping="{dxgn:Mapping FinishDate}"
            ProgressMapping="Progress"
            BaselineStartDateMapping="BaselineStartDate"
            BaselineFinishDateMapping="BaselineFinishDate"

            PredecessorLinksPath="Links">
            <dxgn:GanttView.PredecessorLinkMappings>
                <dxgn:GanttPredecessorLinkMappings Task="Id" PredecessorTask="PredecessorId"/>
            </dxgn:GanttView.PredecessorLinkMappings>
        </dxgn:GanttView>
    </dxgn:GanttControl.View>
</dxgn:GanttControl>

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the NameMapping property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also