'Declaration Public Event ClipboardPasting As EventHandler(Of ClipboardPastingEventArgs)
public event EventHandler<ClipboardPastingEventArgs> ClipboardPasting
The event handler receives an argument of type ClipboardPastingEventArgs containing data related to this event. The following ClipboardPastingEventArgs properties provide information specific to this event.
Property | Description |
---|---|
ClipboardValue | The original clipboard value that will be pasted. |
Values | The parsed clipboard value that will be pasted. |
Private Sub targetXamGrid_ClipboardPasting(ByVal sender As Object, ByVal e As Infragistics.Controls.Grids.ClipboardPastingEventArgs) Dim collection As New ObservableCollection(Of ProductExtended)() For Each row In e.Values Dim productData = New ProductExtended() productData.ProductID = Convert.ToInt32(row(0)) productData.ProductName = row(1) productData.TotalPrice = (Convert.ToDecimal(row(2))) * (Convert.ToDecimal(row(3))) collection.Add(productData) Next targetXamGrid.ItemsSource = collection End Sub
void targetXamGrid_ClipboardPasting(object sender, Infragistics.Controls.Grids.ClipboardPastingEventArgs e) { ObservableCollection<ProductExtended> collection = new ObservableCollection<ProductExtended>() foreach (var row in e.Values) { ProductExtended productData = new ProductExtended(); productData.ProductID = Convert.ToInt32(row[0]); productData.ProductName = row[1]; productData.TotalPrice = (Convert.ToDecimal(row[2])) * (Convert.ToDecimal(row[3])); collection.Add(productData); } targetXamGrid.ItemsSource = collection; }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2