|
-
April 4th, 2003, 05:44 PM
#1
Drag & Drop on DataGrid Not Working
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|