Please note: In an effort to better serve you, we are in the process of restructuring DevCenter.
In the process, we have moved many items that you may be used to finding in DevCenter over to the
Main Site. If you are having trouble locating something,
please try looking at the following places:
The UltraGrid has the ability to allow the end-user to drag and drop rows to a different location within it. This article demonstrates how to allow rows to be dragged to different locations in an UltraGrid.
The first step is to set the UltraGrid’s AllowDrop property to True. In C#:
Next, handle the UltraGrid’s SelectionDrag event and call the UltraGrid’s DoDragDrop() method. The SelectionDrag event fires when the end-user clicks and starts to drag a selected row.In C#:
Now handle the UltraGrid’s DragOver event to set the drag effects and permit scrolling to occur so you can drag the row anywhere on the UltraGrid.In C#:
Finally, handle the UltraGrid’s DragDrop event and get the position on the grid where the rows are to be dropped. Once we have that location, we can move the row(s) to it.In C#: