Changing the sorting of panels in dashboard layout

Is there any way to change the behaviour dashboard widget when I drag a panel where already exists it either pushes old panel to end of the dashboard wherever place is available but I want to readjust the
panel, if there’s space behind the old panel it should move one step back and the new place should be placed and if there’s no space available behind it should move all adjacent panels one step forward and new panel should be placed.

Hello, @aditya_yavagal

Dashboard has DND events that can be used to catch the necessary moment and control dran-n-drop for panels. To prevent panels from being dragged, you can use the onBeforeDrag event ( returning false will prevent dragging of the element).
At the same time, to move panel from one place to the other it’s possible to use the moveView method.
This example isn’t a direct solution, but it may give you some useful ideas: Code Snippet

Kind regards,