AMON
April 4th, 2003, 04:44 PM
I have AllowDragDrop set to TRUE on DataGrid1 and DataGrid2.
Here is my code..
private void dataGrid1_DragLeave(object sender, System.EventArgs e)
{
string strText = "Testing";
dataGrid1.DoDragDrop(strText, DragDropEffects.Copy) ;
}
private void dataGrid2_DragDrop(object sender, System.Windows.Forms.DragEventArgs e)
{
string strText = e.Data.GetData(DataFormats.Text).ToString();
MessageBox.Show(strText);
}
I'm trying to do a grad test to pass the word "Testing". When I drag an item from datagrid1 to datagrid2, nothing happens. Any idea what is going on?
Thank you!
- Adrian
Here is my code..
private void dataGrid1_DragLeave(object sender, System.EventArgs e)
{
string strText = "Testing";
dataGrid1.DoDragDrop(strText, DragDropEffects.Copy) ;
}
private void dataGrid2_DragDrop(object sender, System.Windows.Forms.DragEventArgs e)
{
string strText = e.Data.GetData(DataFormats.Text).ToString();
MessageBox.Show(strText);
}
I'm trying to do a grad test to pass the word "Testing". When I drag an item from datagrid1 to datagrid2, nothing happens. Any idea what is going on?
Thank you!
- Adrian