Search code examples
extjsstore

Adding dynamic data to extjs store


I need to add a lots of records into an extjs data store dynamically by looping. But store.add takes normally much time. Is it possible to add these data togetherly?


Solution

  • You can use store.loadData() or store.loadRecords() methods:

     var mydata = [
         [1, 'John', 'Smith'],
         [2, 'Fred', 'Jones']
     ];
    store.loadData(mydata, false);