View Full Version : Ext.view.View reordering item

3 Jul 2013, 1:07 AM
Hi, i have Ext.view.View with template , how can i implement next behavior : second element put before first element, and save it position(e.g. in store). and do it for any elements. For now i can drag all elements in any direction, but each elements bounded on the left side of its initial position and I can not move for it.(see attachments) . Thanks for your attention

4 Jul 2013, 1:18 PM
There is a plugin for re-ordering tree and grid items from the framework that do just what you're asking with grids / trees, but not with a view.

You will need to implement your own drag / drop for your view. The view items can be structured by your own implementation of CSS decoration and that will need to be accounted for in the drop operations - determining whether the drop occurred before or after / left or right of an existing node.

You should inspect the source for Ext.grid.plugin.DragDrop and the classes it uses to get an idea of how to set your own up.