Listview drag and drop RRS feed

  • Question

  • I have a to do list that I would like to prioritize by letting the user drag and drop items in a list view. It seems like drag and drop is not supported by the winjs listview. First off, is that correct? Second, if yes, could I use HTML 5 drag and drop (e.g. http://www.html5rocks.com/en/tutorials/dnd/basics/) and are there any known issues of doing that with the listview? Seems like a pretty basic use case and I haven't had any luck finding examples or guidance on this. Any help is appreciated, thanks!
    Wednesday, September 26, 2012 1:26 AM

All replies

  • Anyone? Also, any examples of how to move items up and down the listview if I was to use Up and Down appbar commands?
    Thursday, September 27, 2012 12:41 PM
  • This has a scenario of moving items in the ListView (I think the shuffle scenario):


    Dragging is not implemented in ListView.  I don't know of an example explicitly using ListView and HTML5 drag drop.


    Jeff Sanders (MSFT)

    Thursday, September 27, 2012 1:25 PM
  • Thank you, the example is helpful.

    I am now using myListView.itemDataSource.moveAfter, myListView.itemDataSource.moveBefore and that works as expected.

    Now I am looking for an event in either IListDataSource or the ListView control (like a changed) that I can listen to when the move is complete so I can save the change to my data store (indexeddb in this case). I am not having luck finding such event, any suggestions?

    Friday, September 28, 2012 12:08 PM