PDA

View Full Version : How to change root items of TreeStore



dbtpdnjs
10 Aug 2011, 8:37 PM
origin data : searchStructure = []

change data : searchStructure = eval("[{ text: 'ProtoType2',cls: 'launchscreen',items: [{text: 'aaa', card: aaa, source: 'aaa.js',leaf: true}]}]");



SearchStructureStore = new Ext.data.TreeStore({
model: 'manual',
root: {
items: searchStructure
},
autoLoad: true,
proxy: {
type: 'ajax',
reader: {
type: 'tree',
root: 'items'
}
}
});

I can't find how to change root items of TreeStore from origin data to change data .

I've found the API, but i could find that.

plz help me.