Home Forums WinForms controls Xceed Grid for WinForms dragging and dropping between grids

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #14212 |

    I am trying to set up two grids so that the user can drag a row onto the other grid to add it. I am trying to add a handler to the mousedown and mousemove events for the grid. I first added the mousedown handler to the whole grid componenent but it wasnt catching the event when you actually clicked on a row, only the empty part of the grid… so I added the mousedown handler to the row instead and it still is not catching the mousedown event when you click on a row. any ideas?

    Imported from legacy forums. Posted by peter.roca (had 1906 views)

    User (Old forums)
    Member
    Post count: 23064

    You probably need to set up the event handler to trigger on each cell within the grid (not just the grid, and not just the rows in the grid). Something like this c# sample should do it:

    foreach( DataCell cell in myGrid.DataRowTemplate.Cells )
    {
    cell.MouseDown += new MouseEventHandler( My_MouseDown_EventHandler );
    cell.MouseUp += new MouseEventHandler( My_MouseUp_EventHandler );
    cell.MouseMove += new MouseEventHandler( My_MouseMove_EventHandler );
    }

    Imported from legacy forums. Posted by AlphaGuys (had 2889 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.