Hi all,
I am working on .NET 2008 winforms, I am trying to drag and drop objects from a DataGridView to some other control. So I had to override the OnMouseDown event handler. Since I have checkboxes there, their state is never changed. Here's my overriden method
public class SeriesGrid : DataGridView
{
protected override void OnMouseDown(MouseEventArgs e)
{
base.OnMouseDown(e);
DataGridViewSelectedRowCollection selectedRows = this.SelectedRows;
if (selectedRows.Count == 0) return;
List<AppDataSeries> toDrag = new List<AppDataSeries>();
for (int i = 0; i < selectedRows.Count; i++)
{
toDrag.Add((AppDataSeries)selectedRows[i].DataBoundItem);
}
this.DoDragDrop(toDrag, DragDropEffects.Copy);
}
}
DoDragDrop seems to be causing the problem, because if I remove it the checkboxes work fine, however I don't get anything to drop in the other control
Any Help?