i did something similar between a explorer bar items and a ultramonthviewsingle and did work fine with this code
Private Sub UltraMonthViewSingle1_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles UMonth.DragDrop Dim ClientPoint As New Point(e.X, e.Y)
dItem = e.Data.GetData(GetType(String)).ToString()
With Me.UMonth ClientPoint = .PointToClient(ClientPoint) .CalendarInfo.Appointments.Add(.GetDayFromPoint(ClientPoint).Date, dItem)
End With
End Sub
Private Sub UltraMonthViewSingle1_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles UMonth.DragEnter e.Effect = DragDropEffects.CopyEnd Sub
now im trying to do the same but draging items from the explorerbar into a wingrid and is not working
when dragingover or enter it shows the denied image and dragdrop does not fire even when my allowdrop property is set to true.
i just want to drag items into my grid from the explorer bar and add new rows with the item name, sequence and some other data tha would be autopolulated
any idea? Thanks.
I can't see any reason why the grid would be any different than any other control in it's DragDrop behavior. Drag and Drop are implemented on Control, and the grid does not do anything special or override these methods as far as I know.
Perhaps you also need to set the Effect property in the DragOver event, in addition to DragEnter?
this is the code im tying on the actual proyect where having the problems
Private Sub dgvMost_AfterRowInsert(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.RowEventArgs) Handles dgvMost.AfterRowInsert e.Row.Cells("Sequence").Value = e.Row.Index + 1
Private Sub dgvMost_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles dgvMost.DragDrop dgvMost.DisplayLayout.Bands(0).AddNew()End Sub
Private Sub dgvMost_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles dgvMost.DragEnter e.Effect = DragDropEffects.CopyEnd Sub