I can't make it work, always send untitled in the grid
what's wrong?
isc.DataSource.create({
ID: "myCommunityDS",
dataFormat: "json",
dataURL: "gridCommunity_data.php",
showPrompt: true,
fields:[
{name:"companyID", type:"integer"},
{name:"ReportsTo", type:"integer"},
{name:"Name", type:"text", lenght:100}
]
});
isc.TreeGrid.create({
ID: "myCommunityTG",
width: 500,
height: 400,
dataSource: "myCommunityDS",
nodeIcon:"/images/node.gif",
folderIcon:"/images/folder.gif",
showOpenIcons:false,
showDropIcons:false,
closedIconSuffix:"",
autoFetchData: true,
data: isc.Tree.create({
modelType: "parent",
rootValue: "1",
nameProperty: "Name",
idField: "companyId",
parentIdField: "ReportsTo",
data: myCommunityDS
})
});
and the gridCommunity_data.php result is:
[{companyId:"4", ReportsTo:"1", Name:"Charles Madigen"},{companyId:"188", ReportsTo:"4", Name:"Rogine Leger"},{companyId:"189", ReportsTo:"1", Name:"Gene Porter"},{companyId:"265", ReportsTo:"189", Name:"Olivier Doucet"},{companyId:"264", ReportsTo:"189", Name:"Cheryl Pearson"}]
please help, I need to sleep !.
regards,
what's wrong?
isc.DataSource.create({
ID: "myCommunityDS",
dataFormat: "json",
dataURL: "gridCommunity_data.php",
showPrompt: true,
fields:[
{name:"companyID", type:"integer"},
{name:"ReportsTo", type:"integer"},
{name:"Name", type:"text", lenght:100}
]
});
isc.TreeGrid.create({
ID: "myCommunityTG",
width: 500,
height: 400,
dataSource: "myCommunityDS",
nodeIcon:"/images/node.gif",
folderIcon:"/images/folder.gif",
showOpenIcons:false,
showDropIcons:false,
closedIconSuffix:"",
autoFetchData: true,
data: isc.Tree.create({
modelType: "parent",
rootValue: "1",
nameProperty: "Name",
idField: "companyId",
parentIdField: "ReportsTo",
data: myCommunityDS
})
});
and the gridCommunity_data.php result is:
[{companyId:"4", ReportsTo:"1", Name:"Charles Madigen"},{companyId:"188", ReportsTo:"4", Name:"Rogine Leger"},{companyId:"189", ReportsTo:"1", Name:"Gene Porter"},{companyId:"265", ReportsTo:"189", Name:"Olivier Doucet"},{companyId:"264", ReportsTo:"189", Name:"Cheryl Pearson"}]
please help, I need to sleep !.
regards,
Comment