Back to Devexpress

DataControlBase.CopyCurrentItemToClipboard() Method

wpf-devexpress-dot-xpf-dot-grid-dot-datacontrolbase-c72fbfb6.md

latest2.7 KB
Original Source

DataControlBase.CopyCurrentItemToClipboard() Method

Copies the values displayed within the current item to the clipboard.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public void CopyCurrentItemToClipboard()
vb
Public Sub CopyCurrentItemToClipboard

Remarks

To learn more, see Clipboard Management.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CopyCurrentItemToClipboard() method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

how-to-access-and-remove-rows-by-using-a-custom-cells-context-menu-e1558/CS/Window1.xaml.cs#L15

csharp
if (view.GridMenu.MenuInfo is GridCellMenuInfo menuInfo && menuInfo.Row != null)
        grid.CopyCurrentItemToClipboard();
}

how-to-access-and-remove-rows-by-using-a-custom-cells-context-menu-e1558/VB/Window1.xaml.vb#L19

vb
Dim menuInfo As GridCellMenuInfo = Nothing
    If CSharpImpl.__Assign(menuInfo, TryCast(Me.view.GridMenu.MenuInfo, GridCellMenuInfo)) IsNot Nothing AndAlso menuInfo.Row IsNot Nothing Then Me.grid.CopyCurrentItemToClipboard()
End Sub

See Also

CopySelectedItemsToClipboard()

CopyCellsToClipboard

DataControlBase Class

DataControlBase Members

DevExpress.Xpf.Grid Namespace