Hey,
I'm using release SmartClient_v83p_2013-02-06 and I'm trying to set certain nodes open state be default.
I've managed to do it by using
but whenever I re-fetch the data with the fetchData function the tree ignore the isOpen setting that is being returned by the server.
Why?
You can reproduce this by using the example you have in the feature explorer - Tree - Load XML (Parent Links).
Use this file (employeesDataParentLinked.xml):
and use this initiation:
Now, change the false to true in the isOpen tag and click on the Fetch button and you can see that the node is not open.
I'm using release SmartClient_v83p_2013-02-06 and I'm trying to set certain nodes open state be default.
I've managed to do it by using
Code:
dataProperties: { openProperty: "isOpen" }
Why?
You can reproduce this by using the example you have in the feature explorer - Tree - Load XML (Parent Links).
Use this file (employeesDataParentLinked.xml):
Code:
<Employees> <employee> <EmployeeId>7</EmployeeId> <ReportsTo>1</ReportsTo> <Name>Charles Madigen</Name> <isOpen>false</isOpen> <Job>Chief Operating Officer</Job> </employee> <employee> <EmployeeId>188</EmployeeId> <ReportsTo>7</ReportsTo> <Name>Rogine Leger</Name> <Job>Mgr Syst P P</Job> </employee> <employee> <EmployeeId>189</EmployeeId> <ReportsTo>7</ReportsTo> <Name>Gene Porter</Name> <Job>Mgr Tech Plng IntIS T</Job> </employee> <employee> <EmployeeId>265</EmployeeId> <ReportsTo>189</ReportsTo> <Name>Olivier Doucet</Name> <Job>Asset Spec Lines Stns</Job> </employee> <employee> <EmployeeId>264</EmployeeId> <ReportsTo>189</ReportsTo> <Name>Cheryl Pearson - Deddy is a Monkey</Name> <Job>Dsl Sys Rep</Job> </employee> </Employees>
Code:
isc.DataSource.create({ ID:"employees", dataURL:"/isomorphic/system/reference/inlineExamples/trees/dataBinding/employeesDataParentLinked.xml", recordXPath:"/Employees/employee", fields:[ {name:"Name"}, {name:"Job"}, {name:"EmployeeId", primaryKey:true, type:"integer", title:"Employee ID"}, {name:"ReportsTo", foreignKey:"employees.EmployeeId", type:"integer", title:"Manager"} ] }); isc.VLayout.create({ members: [ isc.TreeGrid.create({ ID: "employeeTree", dataSource: "employees", autoFetchData: true, dataProperties: { openProperty: "isOpen"}, loadDataOnDemand: false, // customized appearance width: 500, height: 400, nodeIcon:"icons/16/person.png", folderIcon:"icons/16/person.png", showOpenIcons:false, showDropIcons:false, closedIconSuffix:"" }), isc.Label.create({ contents: "Fetch", click: function() { employeeTree.fetchData({name:new Date()}); }})]});
Comment