Latest posts by Goran (see all)
- Deploy with Bitbucket + Webhook + PHP/Bash - August 17, 2016
- How to setup Varnish Cache - December 17, 2015
- ExtJS 6 – So what’s new? - October 29, 2015
Wondering maybe on how to delete an ExtJS store record?
Just a beginner hint on how to remove a record from ExtJS store. I am updating some comboboxes and just came in situation where i need to remove some records for particular users.
I noticed on forums that people often search queries like “how to delete ExtJS grid record” or “how to remove a record from ExtJS combobox”.
If you are working with Ext.data.Store or Ext.data.ArrayStore for example, methods are same.
If you want to read more about stores go here.
Ok so to delete store first record:
1 |
store.remove(store.first()); |
Delete last record
1 |
store.remove(store.last()); |
Delete record on index n
1 |
store.removeAt(n); |
removeAt will update component automatically.
remove method recives model instance or array of instances. removeAt recives record index.