Esempio n. 1
0
        private void dragDropEventsFav_DragOver(object sender, DevExpress.Utils.DragDrop.DragOverEventArgs e)
        {
            DragOverGridEventArgs args = DragOverGridEventArgs.GetDragOverGridEventArgs(e);

            if (e.Target == e.Source && args.InsertType == InsertType.After && args.HitInfo.RowHandle != _favorites.Count - 1)
            {
                Trace.WriteLine($"## {args.HitInfo.RowHandle:X}");
                e.InsertType = InsertType.None;
                e.Action     = DragDropActions.None;
                //Cursor = Cursors.No;
                e.Handled = true;
                return;
            }
            //if (args.HitInfo.HitTest == DevExpress.XtraGrid.Views.Grid.ViewInfo.GridHitTest.EmptyRow)
            //{
            //	//e.Action = DragDropActions.;
            //	Cursor.Current = Cursors.Hand;//keine sichtbare auswirkung
            //	args.Handled = true;
            //	return;
            //}
            e.InsertType = args.InsertType;
            //e.InsertType = InsertType.After;//keine sichtbare auswirkung
            e.InsertIndicatorLocation = args.InsertIndicatorLocation;
            e.Action       = args.Action;
            Cursor.Current = args.Cursor;
            args.Handled   = true;
        }
Esempio n. 2
0
 private void OnDragOver(object sender, DevExpress.Utils.DragDrop.DragOverEventArgs e)
 {
     e.Default();
     e.Action  = DragDropActions.Copy;
     e.Handled = true;
     e.Cursor  = Cursors.Default;
 }
Esempio n. 3
0
 private void dragDropEvents1_DragOver(object sender, DevExpress.Utils.DragDrop.DragOverEventArgs e)
 {
     // The data on GRID1 can´t be sorted using the drag&Drop.
     //if (e.Source == e.Target)
     //{
     //	e.InsertType = InsertType.None;
     //	e.Action = DragDropActions.None;
     //	Cursor = System.Windows.Forms.Cursors.No;
     //	e.Handled = true;
     //}
 }