Reputation: 4326
Is there a way to add a record to the store after the specific record not using addSorted?
Upvotes: 9
Views: 12956
Reputation: 159
More specific way to add new element(s) in store at first place like...
Ext.data.Store.insert(0, [{id: 0, name: '(un-assigned)'}]);
Upvotes: 5
Reputation: 14447
Check Ext.data.Store.insert(index)
which allows you to insert a record at a specified index. Only thing you need is the index of the record you want to insert it after, thats what you have Ext.data.Store.find()
for
http://dev.sencha.com/deploy/dev/docs/?class=Ext.data.Store
Upvotes: 19