All docs
V20.2
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
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.

TreeViewControl.ClipboardNodeCopying Event

Occurs before a user copies a node to the clipboard. Allows you to apply a format, change the copied data, or skip a node.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v20.2.dll

Declaration

public event EventHandler<ClipboardRowCopyingEventArgs> ClipboardNodeCopying
Public Event ClipboardNodeCopying As EventHandler(Of ClipboardRowCopyingEventArgs)

Event Data

The ClipboardNodeCopying event's data class is ClipboardRowCopyingEventArgs. The following properties provide information specific to this event:

Property Description
Cancel Gets or sets whether to cancel the copy operation.
Headers Gets a collection of column headers or band headers.
RowHandle
Type Gets the processed object's type (row, column header, band header, group, group summary).
Values Gets a collection of row or group row values.

Remarks

The code sample below changes the appearance of nodes.

<dxg:TreeViewControl x:Name="treeview"
                     SelectionMode="Row"
                     ClipboardCopyOptions="All"
                     ClipboardMode="Formatted"
                     ClipboardNodeCopying="treeview_ClipboardNodeCopying"
                     ... />
private void treeview_ClipboardNodeCopying(object sender, DevExpress.Xpf.Grid.ClipboardRowCopyingEventArgs e) {
    if (e.Type == DevExpress.XtraExport.Helpers.ClipboardInfoType.Row)
        foreach (var value in e.Values) {
            value.BackColor = System.Drawing.Color.Gray;
            value.ForeColor = System.Drawing.Color.White;
            for (int i = 0; i < treeview.GetNodeByValue(value.OriginalValue).Level; i++) {
                value.Value = "   " + value.DisplayValue;
            }
        }
}

For information on how to copy TreeViewControl data to the clipboard, refer to the following DevExpress WPF Grid help topic: Clipboard Management.

See Also