I have a Windows form with a datagridview on it.
If I select say 5 MP3's and drop them into the datagridview I only get one row appear. How do I handle each file on each drop to add a row?
Here is the code.
Thankyou!
If I select say 5 MP3's and drop them into the datagridview I only get one row appear. How do I handle each file on each drop to add a row?
Here is the code.
VB.NET:
Private Sub DataGridView1_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles DataGridView1.DragEnter
If (e.Data.GetDataPresent(DataFormats.FileDrop)) Then
e.Effect = DragDropEffects.Copy
End If
Private Sub DataGridView1_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles DataGridView1.DragDrop
DataGridView1.Rows.Add((CType(e.Data.GetData(DataFormats.FileDrop), Array).GetValue(0).ToString))
End Sub
Thankyou!
