Private Sub xamGrid_ClipboardCopyingItem(ByVal sender As Object, ByVal e As ClipboardCopyingItemEventArgs)
' Get the reference to the cell that will be copied
Dim selectedCell As CellBase = e.Cell
' The headers cells style will not be changed
If selectedCell.Row.RowType <> RowType.HeaderRow Then
' Add verification for valid data in a data cell.
' In this case, the negative values cells in UnitsOnOrder columnwill not be copied. If selectedCell.Column.Key.Equals("UnitsOnOrder")
AndAlso Convert.ToInt32(e.Cell.Value) <= 0 Then
e.Cancel = True
Return
End If
' Set the new style to the cells that will be copied
selectedCell.Style = TryCast(Me.Resources("grayCellStyle"), Style)
End If
End Sub