Hi
It's my experience that item rearranging using a RearrangingDropSink only works if the OLV is in Details view.
Is that correct? I need it in LargeIcon view, and even thougt it behaves like a drag and drop item reorder is in progress, nothing happens when I drop.
It's no more complicated than this (as far as the reordering is concerned anyway. I also attempt to allow drag and drop of files from the Explorer on the same time, and that makes it all a little more complicated)
RearrangingDropSink dropSink = new RearrangingDropSink(false);
dropSink.Dropped += DropSink_Dropped;
DocumentPageListView.DragSource = new SimpleDragSource();
DocumentPageListView.DropSink = dropSink;
Regards,
Johnny J.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yup - it's true. I did a quick and dirty workaround by copying all of the code for RearrangingDropSink to a new class and changing the RearrangeModels method like this:
New code uses C#6 string interpolation, not available in VS2012 and earlier. All four lines in DropSink.cs are calls to System.Diagnostics.Debug.WriteLine.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi
It's my experience that item rearranging using a RearrangingDropSink only works if the OLV is in Details view.
Is that correct? I need it in LargeIcon view, and even thougt it behaves like a drag and drop item reorder is in progress, nothing happens when I drop.
It's no more complicated than this (as far as the reordering is concerned anyway. I also attempt to allow drag and drop of files from the Explorer on the same time, and that makes it all a little more complicated)
RearrangingDropSink dropSink = new RearrangingDropSink(false);
dropSink.Dropped += DropSink_Dropped;
DocumentPageListView.DragSource = new SimpleDragSource();
DocumentPageListView.DropSink = dropSink;
Regards,
Johnny J.
Yup - it's true. I did a quick and dirty workaround by copying all of the code for RearrangingDropSink to a new class and changing the RearrangeModels method like this:
** this.ListView.SuspendLayout();
** this.ListView.View = View.Details;
** this.ListView.View = View.LargeIcon; **
** this.ListView.ResumeLayout();**
Works fine, but it's definitely not the best solution to the problem... ;-)
/Johnny
Yes, I didn't get around to implementing horizontal rearrangement :(
However, I've just checked in the code to the SF repo which allow rearrangement on
LargeIcon,SmallIconandTileviews.Give it a try and see if it works for you :)
New code uses C#6 string interpolation, not available in VS2012 and earlier. All four lines in DropSink.cs are calls to System.Diagnostics.Debug.WriteLine.
Thanks. I forgot to take out the debugging lines.
I've taken them out now.