We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Moving rows trouble

i have this problem: https://www.screencast.com/t/dbTeCtJDM
i need it to not think the row moved if it didn't actually move.
my code:

Public Class GridRowDragDropControllerNoPopup
        Inherits GridRowDragDropController

        Dim rowStartIndex As Integer
        Dim rowStartData As Object

        Public Sub New()
            MyBase.New()
        End Sub

        Protected Overrides Sub ShowDragDropPopup(dropPosition As DropPosition, draggingRecords As ObservableCollection(Of Object), args As DragEventArgs)
            args.Handled = True
        End Sub

        Protected Overrides Sub ProcessOnDragStarting(args As MouseEventArgs, rowColumnIndex As RowColumnIndex)

            MyBase.ProcessOnDragStarting(args, rowColumnIndex)

            CloseDraggablePopUp()
            'CloseDragIndicators() ' uncomment this to get rid of indicator arrows

            args.Handled = True

            rowStartIndex = rowColumnIndex.RowIndex
            rowStartData = args.Source

        End Sub

        Protected Overrides Sub ProcessOnDragOver(args As DragEventArgs, rowColumnIndex As RowColumnIndex)

            MyBase.ProcessOnDragOver(args, rowColumnIndex)

            CloseDraggablePopUp()
            'CloseDragIndicators() ' uncomment this to get rid of indicator arrows

            args.Handled = True

        End Sub

        Protected Overrides Sub ProcessOnDrop(args As DragEventArgs, rowColumnIndex As RowColumnIndex)

            MyBase.ProcessOnDrop(args, rowColumnIndex)

            If args.Source.Equals(rowStartData) Then
                Debug.Write("didn't move")
            End If

            args.Handled = True


            'args.Data.GetDataPresent()

        End Sub

    End Class

1 Reply

SP Shobika Palani Syncfusion Team July 2, 2019 01:38 PM UTC

Hi Nick, 
 
Thank you for contacting Syncfusion support. 
 
We have analyzed your query. And we are not clear with your requirement. On investigating the video that you have shared, we suspect that you are reporting that the rows are not moved while drag and drop. On further investigating your provided code snippet, you have handled to restrict the row from being dropped in ProcessOnDrop method at your end. Because of this only, the nodes are not dropped properly.  
 
Could you please confirm us whether you are reporting the above issue? If not please revert us with clear details on your requirement. It will helps us to investigate further and provide appropriate solution at earlier. 
 
Regards,
Shobika.
 


Loader.
Up arrow icon