Articles in this section

How to resolve the Copy paste issue in WinForms GridGroupingControl when the startup projects is in WPF?

Resolve the copy-paste issue


According to Windows Forms, copy-paste operations cannot be performed on WinForms GridGroupingControl when the startup project is in WPF. While opening the Windows Forms form from the WPF window, the keyboard messages are not passed to the WPF window.  Add the EnableWindowsFormsInterop method in the Startup event to enable the copy and paste option.

<Application x:Class="AutoHideDemo.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
StartupUri="Window1.xaml" Startup="Application_Startup" >

To enable the Windows Forms copy and paste options when the Startup project is WPF.

C#

private void Application_Startup(object sender, StartupEventArgs e)
{
   WindowsFormsHost.EnableWindowsFormsInterop();
}

VB

Private Sub Application_Startup(ByVal sender As Object, ByVal e As StartupEventArgs)
   WindowsFormsHost.EnableWindowsFormsInterop()
End Sub

The screenshot below illustrates the copy and paste options in GridGroupingControl.


Show the copy paste value

Samples:

C#: Copy paste

VB: Copy paste

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied