Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
3455
Drag Over appearance
posted

Hi,

I have two ultra grid in a form and I have enable the drag drop feature.

When I drag a row to another location in the same grid the mouse pointer is showing a small rectangle which means draging a row that is fine,

When I drag the mouse pointer outside the grid the mouse pointer now shows cancel sign, that is also fine.

But when I drag over to the second grid the mouse pointer is showing small rectangle.

How can I shows the cancel sign when the mouse is over the second grid, as I am dragging rows from the first grid.

Regards,

Ceaser

Parents
No Data
Reply
  • 71886
    Offline posted

    Hello,

    As I understood you - you want to have enabled the drag and drop in both of the grids and to not allow the user to drop an item from one grid in another. If that is right you could hook onto the DragOver event of the UltraGrid controls. The following is my code sample:

    [/code]

     private void ultraGrid2_DragOver(object sender, DragEventArgs e)  

    {

      e.Effect = DragDropEffects.Move;

     if (e.Effect == DragDropEffects.Move && ultraGrid1.Focused) 

    {

      e.Effect = DragDropEffects.None;  

    }

      }

    [/code]

    You could do this for the other WinGrid in order to achieve the desired behavior.

    Please do not hesitate to ask if something comes up.

Children
No Data