Results 1 to 2 of 2

Thread: What is the right way to clear a store?

  1. #1
    Sencha User
    Join Date
    Apr 2013
    Posts
    143
    Answers
    5

    Default Answered: What is the right way to clear a store?

    Code:
    store.removeAll();
    store.clearData();
    store.setData([]);
    Which is the right way to do it?

    'clearData' seems the dataview/list items are still there, but it throws an exception when click them.

  2. removeAll() is the way to do it.

    clearData isn't public: http://docs.sencha.com/extjs/6.5.2/c...thod-clearData

  3. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,254
    Answers
    759

    Default

    removeAll() is the way to do it.

    clearData isn't public: http://docs.sencha.com/extjs/6.5.2/c...thod-clearData
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

Similar Threads

  1. Store.loadData(..., false) doesn't clear the store
    By da_b0uncer in forum Ext: Q&A
    Replies: 1
    Last Post: 8 Aug 2013, 1:21 AM
  2. Replies: 1
    Last Post: 12 Apr 2013, 1:08 PM
  3. Difference between store.removeAll() and store.getProxy.clear()
    By gmitra in forum Sencha Touch 2.x: Q&A
    Replies: 1
    Last Post: 2 Dec 2012, 7:53 AM
  4. Replies: 13
    Last Post: 2 May 2012, 6:37 AM
  5. clear store
    By vivendi in forum Sencha Touch 1.x: Discussion
    Replies: 3
    Last Post: 31 Aug 2011, 6:53 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •