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
219
Changing item order...
posted

When using an UltraListView control with the View property set to "List," is there a simple way to give the user the ability to change the order of the items in the list (such as dragging an item to a different location in the list)? 

Parents
  • 69832
    Verified Answer
    Offline posted

    No, there is no property setting that enables the behavior you describe here. The control exposes an ItemFromPoint method, which enables you to hit test for an item during a drag operation, and the UltraListViewItemsCollection (returned from the control's Items property) exposes Remove and Insert methods, so once you have a reference to the item you want to reposition, you can get the Index of the item it is being dragged "to", remove the item being dragged, and insert it at the new position as defined by that index.

Reply Children
No Data