Hello
I'm trying to do basic drag and drop from DataGrid control. The problem
is that after I start DoDragDrop, items in DataGrid will become
unselected. I wish them to remian selected.
I hav such code:
private void dataGrid_MouseDown(object sender,
System.Windows.Forms.MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
System.Drawing.Point point = new Point(e.X, e.Y);
DataGrid.HitTestInfo hit= dataGridLista.HitTest(point);
if(hit.Type == DataGrid.HitTestType.Cell)
{
this.DoDragDrop(this.PozycjaRekorduWDatasecie,Drag DropEffects.None);
dataGridLista.CurrentCell = new DataGridCell(hit.Row, hit.Column);
dataGridLista.Select(hit.Row);
}
}
}
If I comment uot yhis.DoDragDrop, the item will be selected. Otherwise
it is on.
Note that I have to select whole row, not just one cell.
--
Semper Fidelis
Adam Klobukowski
at***@gabo.pl