2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
OLE drag and dropThe most likely cause of this problem is that your Main entry point does not have the [STAThread] attribute associated with it. Without this attribute, the Essential Grid support of the OLE Drag and Drop causes this error. Solution: There are two possible solutions. The first one is to add the [STAThread] attribute and remove the [MTAThread] attribute in case it is present. The second one is to remove the OLE Drag and Drop support from the Essential Grid. Solution 1: Here is a sample Main entry point with the STAThread attribute. C# [STAThread] static void Main() { Application.Run(new Form1()); } VB <STAThread> Shared Sub Main() Application.Run(New Form1()) End Sub Solution 2: To remove OLE Drag and Drop support so that your application can be MTAThread.
C# [MTAThread] static void Main() { Application.Run(new Form1()); } //In Form_Load. //Turns AllowDrop off. this.gridControl1.AllowDrop = false; //Turns off the OLE options in ControllerOptions this.gridControl1.ControllerOptions -= GridControllerOptions.OleDataSource | GridControllerOptions.OleDropTarget; //Sets DataObjectConsumerOptions value as “None”. this.gridControl1.DataObjectConsumerOptions = GridDataObjectConsumerOptions.None; VB <MTAThread> Shared Sub Main() Application.Run(New Form1()) End Sub 'In Form_Load 'Turns AllowDrop off. Me.gridControl1.AllowDrop = False 'Turns off the OLE options in ControllerOptions. Me.gridControl1.ControllerOptions -= GridControllerOptions.OleDataSource Or GridControllerOptions.OleDropTarget ' Sets DataObjectConsumerOptions value as “None”. Me.gridControl1.DataObjectConsumerOptions = GridDataObjectConsumerOptions.None
|
2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.