PDA

View Full Version : Obtain sorted models in a TreeGrid (with drag and drop)



matroska
27 Feb 2012, 12:56 PM
Hi,

I have a tree grid with drag and drop reordering functionality. To retrieve the sorted models I was expecting to call getAllItems in the TreeStore but unfortunately it returns the same data in the same original order. How can I obtain the item position/all the models in the right order?

Thanks

catalin.ciobanu
29 Feb 2012, 6:59 AM
getAllItems
public java.util.List<M (http://www.jarvana.com/jarvana/view/com/extjs/gxt/2.1.1/gxt-2.1.1-javadoc.jar!/gxt-2.1.1-javadoc/com/extjs/gxt/ui/client/store/TreeStore.html)> getAllItems()Returns all the stores items. The items are not returned in any order.Returns:the items
You should override this method in your TreeStore, make it to return the items in the order you need.