Adding a store entry to a specific location

Is there a way to add a record to the repository after a specific record without using addSorted?

+7
source share
2 answers

Check Ext.data.Store.insert(index) , which allows you to insert a record at the specified index. The only thing you need is the index of the record you want to insert after, here is what you have Ext.data.Store.find() for

http://dev.sencha.com/deploy/dev/docs/?class=Ext.data.Store

+17
source

A more specific way to add new items to the repository comes first, for example ...

 Ext.data.Store.insert(0, [{id: 0, name: '(un-assigned)'}]); 
+2
source

All Articles