TreeList.ClipboardNodePasting Event

Fires before a node is pasted to the control. Allows you to apply a format, update the pasted data, or skip a data row.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v20.1.dll

Declaration

[DXCategory("Action")]
public event ClipboardNodePastingEventHandler ClipboardNodePasting
<DXCategory("Action")>
Public Event ClipboardNodePasting As ClipboardNodePastingEventHandler

Event Data

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

Property Description
Cancel Gets or sets whether the current operation needs to be canceled.
DataRowCount Gets the count of rows that contain data to process (without column and band header rows).
OriginalValues Returns a read-only collection of individual pasted values.
PasteMode Gets or sets whether only valid rows or all rows are pasted to the control.
RowCount Gets the total count of rows to process (with column and band header rows).
TreeListNode Depending on the paste mode, returns the parent node relative to which the data is appended, or the updated node.
Values Returns a dictionary that contains "target column - pasted value" pairs. You can modify pasted values in this dictionary to perform custom pasting.

Remarks

The ClipboardNodePasting event fires before a node is pasted to the control from the clipboard. If the clipboard contains multiple nodes, the event fires for each node. The event allows you to modify data or to cancel pasting the processed row.

A node is not pasted to the control if any of its columns cannot accept data being pasted. For example, if data types do not match. You can set the PasteMode event argument to Force to forcibly paste the node.

To check if a particular value or the entire node is valid, use the IsValueValid and IsNodeValid methods.

See Clipboard for more information.

See Also