Dear support,
I am trying to build a win forms view controller that allows dropping and processing of outlook emails or files from the file system on a grid.
The way it will work is that as soon as the Mouse pointer is dragged on a grid view, the grid view is changed to masterdetailview ( This part is working well), and when the mouse pointer is dragged over the grid the focused row is changed to follow the dragged mousepointer. ( this part is not working correctly)
I have encountered a problem with the gridView.CalcHitInfo(NewPoint(e.X, e.Y)) calculation inside the Dragover event handler. Its calculated row handle is higher than the row that the mouse pointer is dragged over.
Can you please review the attached viewcontroller and advise. nb the viewcontroller should work in any winforms project !
( Please note, when you review the code, I also could not get the dragLeave event to fire, so I had to code around that with a timer to switch the master detail view back to list view )
Thanks for your help in advance.
Regards
Leo
I have done some more research, and think the cause is the following : The coordinates passed to the dragdrop event are screen coordinates and not relative coordinates for the grid control. calcinfo probably requires coordinates relative to the top left of the control. I think I need to subtract the top left coordinate of the control from the screen coordinate before I call calchitinfo ???
Please advise