PDA

View Full Version : Allow store to fetch all data beforeLoad



nikita.navale
1 Dec 2015, 5:27 AM
Hi,

I have an ajax call to load data in my JsonStore. But the store ends up loading half or no data at all at times. I suspect this might be due to the ajax call taking time to execute server side logic, which is then skipped by the JS resulting in inconsistent data response.
Is there any way I can have the data fetching logic to be executed completely before the 'load' for store is executed?

Thanks!

jdkhamba
12 Dec 2015, 4:28 PM
If you are using the store in a grid then paging would be the best option. If it just standalone store then you could load the data using just regular Ext.Ajax.request and increase it's timeout so that all the data is loaded. Once that is done you could call loadData() on the store.