>>Hi Steve,
>>
>>I see you experimented a lot with Drag/Drop in grids. Did you meet the situation, when the dragged control (Textbox in a grid) automatically cancels Drag operation when reaches the grid border (grid.DragDrop happens)?
>>Just curious, because I found a workaround for this case.
>>
>>Nick
>
>Hi Nick,
>
>Lots of experimenting with D & D in this grid. As for when it reaches the column where a valid drop can occur, the column turns light blue. The x & Y coordinates are used for this. Once outside the drop zone, the column changes back to white. I'd be curious as to how your "workaround" operates though. Any ideas or suggestions are appreciated.
>
>Thanks,
>Steve Despres
>sdespres@erols.com
In my case, I use only drag to grid to add the new record, and drag from the grid to Trash bin to delete it. I use manual DragMode, MouseMove and DragDrop events of the grid itself. But I do not start Drag for the grid, or its controls. I have invisible label on form, and actually Drag it instead of grid controls.
When the Drag operation starts, label takes the mouse coordinates, so DragIcon appears at the right place.
It does not have any limitations in moving. It is possible to use a Custom control with some properties or array to hold record or some field values.
In my case it is enough to click and drag the record to Trash bin image to delete it.
Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison