'Declaration Public Event ClipboardCopying As EventHandler(Of ClipboardCopyingEventArgs)
public event EventHandler<ClipboardCopyingEventArgs> ClipboardCopying
The event handler receives an argument of type ClipboardCopyingEventArgs containing data related to this event. The following ClipboardCopyingEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Cancel (Inherited from Infragistics.CancellableEventArgs) | |
ClipboardValue | Gets or sets the text being copied to the clipboard. |
SelectedItems | The selected cells that will be copied to the clipboard. |
Private Sub xamGrid_ClipboardCopying(ByVal sender As Object, ByVal e As ClipboardCopyingEventArgs) Dim headerCells As Integer = 0 Dim dataCells As Integer = 0 For Each cell In e.SelectedItems If cell.Row.RowType.Equals(RowType.HeaderRow) Then headerCells += 1 End If If cell.Row.RowType.Equals(RowType.DataRow) Then dataCells += 1 End If Next System.Diagnostics.Debug.WriteLine("The total number of cells being copied:" & Convert.ToString(e.SelectedItems.Count)) System.Diagnostics.Debug.WriteLine("The number of header cells being copied: " & headerCells) System.Diagnostics.Debug.WriteLine("The number of data cells being copied: " & dataCells) End Sub
void xamGrid_ClipboardCopying(object sender, ClipboardCopyingEventArgs e) { int headerCells = 0; int dataCells = 0; foreach (var cell in e.SelectedItems) { if (cell.Row.RowType.Equals(RowType.HeaderRow)) headerCells++; if (cell.Row.RowType.Equals(RowType.DataRow)) dataCells++; } System.Diagnostics.Debug.WriteLine("The total number of cells being copied:" + e.SelectedItems.Count); System.Diagnostics.Debug.WriteLine("The number of header cells being copied:" + headerCells); System.Diagnostics.Debug.WriteLine("The number of data cells being copied:" + dataCells); }
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