I want to load all store data from already available JSON data, how can I?
and whenever require I will call method with data and it will populate my data to Ext Gnt.
Support Forum
A flat store can have a 'data' property which is an array of row data
A tree store can have a 'root' configured on the TaskStore, with 'children' being the array
Recommended reading:
https://docs.sencha.com/extjs/6.0/6.0.0- ... .TreeStore
https://docs.sencha.com/extjs/6.0/6.0.0- ... data.Store
A tree store can have a 'root' configured on the TaskStore, with 'children' being the array
Recommended reading:
https://docs.sencha.com/extjs/6.0/6.0.0- ... .TreeStore
https://docs.sencha.com/extjs/6.0/6.0.0- ... data.Store
Still not able to load data from an array. my code is as below.
var myObject = JSON.parse('Response from read.php');
var treeStore = Ext.create("Ext.data.TreeStore", {
autoLoad: true,
data: [
myObject
]
});
Last edited by VijaySM on Tue Apr 05, 2016 1:30 pm, edited 1 time in total.
It's string and I parse to Array using JSON.parse.
Last edited by VijaySM on Tue Apr 05, 2016 1:38 pm, edited 2 times in total.