Skip to main content

TreeListOptionsClipboard.CopyNodeHierarchy Property

Gets or sets whether selected nodes are copied to the clipboard with or without indents that reflect node hierarchy levels.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v24.1.dll

NuGet Packages: DevExpress.Win.Navigation, DevExpress.Win.TreeList

Declaration

[DefaultValue(DefaultBoolean.Default)]
[XtraSerializableProperty]
public virtual DefaultBoolean CopyNodeHierarchy { get; set; }

Property Value

Type Default Description
DefaultBoolean Default

A DefaultBoolean enumerator value that specifies whether the nodes are copied to the clipboard with indents. The Default value is equivalent to True.

Available values:

Name Description Return Value
True

The value is true.

0

False

The value is false.

1

Default

The value is specified by a global option or a higher-level object.

2

Property Paths

You can access this nested property as listed below:

Object Type Path to CopyNodeHierarchy
TreeList
.OptionsClipboard .CopyNodeHierarchy

Remarks

Consider the following Tree List control with five nodes selected.

CopyNodeHierarchy-example-SourceTreeList

When copying the selection as plain text with the CopyNodeHierarchy property set to True or Default, the copied data contains hierarchy indents for each nested node:

CopyNodeHierarchy-example-CopiedDataWithIndents

If the CopyNodeHierarchy property is set to False, no hierarchy indents are included in the output:

CopyNodeHierarchy-example-CopiedDataWithoutIndents

The screenshots above were made in the PlainText copy mode (see ClipboardOptions.ClipboardMode), in which data is copied as plain text and the TAB character is used for node hierarchy indents. In the Formatted copy mode, data is copied in multiple formats simultaneously. Node hierarchy indents are created in different ways for each of these formats.

See Also