Back to Devexpress

SpreadsheetControl.ClipboardDataObtained Event

wpf-devexpress-dot-xpf-dot-spreadsheet-dot-spreadsheetcontrol-b1941fa2.md

latest3.2 KB
Original Source

SpreadsheetControl.ClipboardDataObtained Event

Occurs after data on the clipboard is obtained and recognized, but before data is pasted.

Namespace : DevExpress.Xpf.Spreadsheet

Assembly : DevExpress.Xpf.Spreadsheet.v25.2.dll

NuGet Package : DevExpress.Wpf.Spreadsheet

Declaration

csharp
public event ClipboardDataObtainedEventHandler ClipboardDataObtained
vb
Public Event ClipboardDataObtained As ClipboardDataObtainedEventHandler

Event Data

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

PropertyDescription
CancelGets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.
FlagsGets or sets the part of the copied data to be pasted into the target range.
RangeGets or sets a cell range in a worksheet from the temporary document model (returned by the ClipboardDataObtainedEventArgs.GetWorksheet method) containing data to be pasted.

The event data class exposes the following methods:

MethodDescription
GetWorksheet()Gets a worksheet from the temporary document model containing data to be pasted.

Remarks

Handle this event to modify the copied data before it is pasted into the target cells. Set the ClipboardDataObtainedEventArgs.Cancel property to true to cancel the paste operation.

This event is the second in a sequence of three events that fire when data is pasted from a cell’s in-place editor or external application. It occurs after the SpreadsheetControl.ClipboardDataPasting event and before the SpreadsheetControl.ClipboardDataPasted event.

See Also

ClipboardDataPasting

ClipboardDataPasted

SpreadsheetControl Class

SpreadsheetControl Members

DevExpress.Xpf.Spreadsheet Namespace