I'm trying to setup a TreeGrid, my data object looks like this:
{
"code": "success",
"data": {
"text": ".",
"children": [
{
"clientname": "Market",
"contact": "OpenX Market Advertiser",
"email": "[email protected]",
I need to tell Ext that it should use data as the root element:
var store = Ext.create('Ext.data.TreeStore', {
model: 'Task',
proxy: {
type: 'ajax',
url: 'http://localhost/rocketads/trunk/advertisers/index/stats:true/',
reader:{
type:'json',
root:'data'
}
},
});
This doesn't work for me although I'm successfully using this with normal Stores.
Since you have setup your reader with root: 'data' you have to replace 'children' with 'data' in your json:
{
"code": "success",
"data": {
"text": ".",
"data": [ // << not "children"
{
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With