This is a migrated thread and some comments may be shown as answers.

Possible to drop an item between two other items?

3 Answers 92 Views
TileView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Manuel Ruf
Top achievements
Rank 1
Manuel Ruf asked on 13 Jul 2012, 09:10 AM
I have a TileView with more than one row and I would like to drop an item from the first row between two items on the second row.
Drag mode "slide" just messes everything up and "swap" is just a straight replacement which is not particularly useful.

3 Answers, 1 is accepted

Sort by
0
Manuel Ruf
Top achievements
Rank 1
answered on 17 Jul 2012, 06:56 AM
I'm guessing it's not possible then..
0
Tina Stancheva
Telerik team
answered on 17 Jul 2012, 07:57 AM
Hi Manuel,

Indeed the default behavior is to swap or slide the tiles. Basically in the RadTileView control, it's hard to implement a drop between two tiles as you need to determine the positions of the mouse that define a 'drop between two items' and this part can be hard. Moreover you need to get the tile position in which the dragged item should be placed based on the position of the mouse when the drag ends. And if the mouse is between two TileViewItems when the drag operation ends, you won't be able to calculate the new position of the dragged tile.

However you can implement custom logic in the RadTileView Drag-related events - TileDragStarted, TileDragEnded to customize the default drag drop logic but as I'm not sure what are your exact requirements, I am not sure if the drag/drop operations can be customized to exactly fit your needs. Still, I attached a sample solution demonstrating how to customize the Swap DragMode to place the dragged tile after the item upon which it is dropped thus pushing all other items one position back. I hope this solution can help you in implementing your requirements.

Greetings,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Manuel Ruf
Top achievements
Rank 1
answered on 17 Jul 2012, 10:19 AM
Sounds promising. Thanks Tina, I'll look into it.
Tags
TileView
Asked by
Manuel Ruf
Top achievements
Rank 1
Answers by
Manuel Ruf
Top achievements
Rank 1
Tina Stancheva
Telerik team
Share this question
or