Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1176
drag and drop into a wingrid
posted

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.Copy
End 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.

Parents
  • 1176
    posted

    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

    End Sub

    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.Copy
    End Sub

Reply Children
No Data