In my WPF app, I am using a Datagrid
control; in the control definition I defined ClipboardCopyMode
property as 'IncludeHeader'.
<DataGrid Name="datagrid" ClipboardCopyMode="IncludeHeader">
</DataGrid>
At times, when I try to copy any data from grid, I am encountering HRESULT
clipboard crash error -
System.Runtime.InteropServices.COMException (0x800401D0):
OpenClipboard Failed (Exception from HRESULT: 0x800401D0 (CLIPBRD_E_CANT_OPEN))
Any suggestions to resolve it. I looked at other posts, mostly they are about how to handle this scenario when you explicitly use the Clipboard
related methods but none related to Datagrid
.