Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to do a DragDrop to a DataGridView cell?

Status
Not open for further replies.

CosmicCharlie

Programmer
Jun 30, 2006
44
US
I am trying to implement a drag/drop operation on a DataGridView using C# and having no luck. The main problem is that the DragEventArgs of the grid's DragDrop event contains no information about the cell overwhich the event took place. I am working with a disconnected grid.

The larger issue is how to implement a visual, drag/drop scheduling screen. If there is a better way to do than with a GridView, I am eager to know it:

I am writing a module that schedules tasks for employees, and client limitations prohibit using Outlook/Exchange or third party tools. I have a user control that represents one occurence of a given task, and I want to effect the scheduling of the task by dragging the control over a grid showing employees on the vertical axis and days on the horizontal. When a user drops a task user control on the grid, the program will detect the employee and day and automatically assign that task for that employee at that time.

If anyone has another suggestion for how this might be done (specifically, what other types of controls can I use for the grid) I am happy to know.






Cosmic Charlie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top