BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
// In InitializeComponent
this.gridControl1 = new MyGridControl();
// class
public class MyGridControl : GridControl
{
protected override void OnDragEnter(DragEventArgs e)
{
base.OnDragEnter (e);
e.Effect = DragDropEffects.Copy;
//e.Effect = DragDropEffects.Copy;
System.Diagnostics.Debug.WriteLine(string.Format("gridControl1_DragOver: AllowedEffect = {0}, Effect = {1}", e.AllowedEffect, e.Effect));
}
protected override void OnDragOver(DragEventArgs e)
{
base.OnDragOver(e);
e.Effect = DragDropEffects.Copy;
//e.Effect = DragDropEffects.Copy;
System.Diagnostics.Debug.WriteLine(string.Format("gridControl1_DragOver: AllowedEffect = {0}, Effect = {1}", e.AllowedEffect, e.Effect));
}
}
Then it should work.
Stefan
>Hi,
>
>I experienced a problem with the grid and drag''n drop. I have written a test app to explain it. When the app is started there are two MDI child windows opened. If I now try to drag a grid cell from the upper window to the lower window then it only works if the DoDragMethod is called with DragDropEffects.All or DragDropEffects.Move. If the DoDragMethod is called with DragDropEffects.Copy the drag icon doesn''t change and the DragDrop event will never been called.
>
>I''am missing something here?
>
>Thanks in advance,
>Holger Persch
>
>DragDropTest_6313.zip
>
>
public class MyGridControl : GridControl
{
public MyGridControl():base()
{
this.Model.Options.DataObjectConsumerOptions = GridDataObjectConsumerOptions.None;
}
}