Answered by:
Please help with Drag and Drop

Question
-
This is my requirement.
I am allowed to use a DGV (or a List View or some other control that can be used in tabular form).
Then, I have a set of labels/text boxes that are created in runtime according to some data from a DB. Let's say just text tabels.
So I need to drag and drop contents of these run time generated textboxes/labels onto any preferred cell in the DGV (or that any other control). When that is done, I need to be able to delete/destroy the original label as well.
On the other hand, if the user decides to take some data from the DGV and put them back in the original labels, that should also be possible. SO I guess those labels/textboxes need to be put inside of some kind of a control.
But I'm relatively new to C#, so haven't got much of an idea so as to how to do this. I could get text on labels to be copied to another lables, but when I used a DGV I got stuck.
Main reason being, when an item is dragged onto the DGV, there seems to be no event to detect on which cell the mouse is. The Mouse_Enter method works only for simple mouse enter movements - not when dragging.
PLEASE HELP!- Moved by Michael Sun [MSFT]Microsoft employee Thursday, October 23, 2008 10:21 AM Off Topic for Visual C# General [loc] (Moved from Visual C# General to Off-Topic Posts (Do Not Post Here))
Tuesday, October 21, 2008 7:22 AM
Answers
-
Hi Sachin,
Thanks you fo rthe post. I could suggest you to post your question by creating a new thread in the
(MSDN Forums » Windows Forms » Windows Forms General » DGV Drag on Scroll-into-View)
located at the URL
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1900609&SiteID=1
Hope that helps.
Thanks & regards,- Proposed as answer by ashawani_dubey Thursday, October 23, 2008 12:04 PM
- Marked as answer by ashawani_dubey Thursday, November 13, 2008 7:14 AM
Thursday, October 23, 2008 12:03 PM
All replies
-
Hello,
Please create a new thread at Windows Forms Data Controls and Databinding forum. You will get more help from the experts on DataSet there.
Thanks,
Best Regards,
Lingzhi
Please remember to mark the replies as answers if they help and unmark them if they provide no help. http://forums.msdn.microsoft.com/en-US/csharpide/thread/8e9ed0d7-11ff-402a-8489-9b5f05eeb706 http://forums.msdn.microsoft.com/en-US/vssetup/thread/60424309-bd78-4ca2-b618-03c4a16123b6Thursday, October 23, 2008 10:21 AM -
Hi Sachin,
Thanks you fo rthe post. I could suggest you to post your question by creating a new thread in the
(MSDN Forums » Windows Forms » Windows Forms General » DGV Drag on Scroll-into-View)
located at the URL
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1900609&SiteID=1
Hope that helps.
Thanks & regards,- Proposed as answer by ashawani_dubey Thursday, October 23, 2008 12:04 PM
- Marked as answer by ashawani_dubey Thursday, November 13, 2008 7:14 AM
Thursday, October 23, 2008 12:03 PM