local DataSource
Sorry, I will explain more:
Suppose I have a local Data Source which is created by the data in a global data source, it is local because I want the data can be changed by my self not by server, I mean I do not want the server be aware I am inserting new data in data source, because I want each time I click on my icon in Tree Grid, it can change; so I need to assign something forexample “x” to “customIconProperty” , and by nodeclick it change the value which is assigned to “X” in data source, so here is 2 question:
1_ Is it possible to change my “x” in datasource and how?
2_ At the end can I insert final changes to my global data source?
here is my tree grid code:
isc.TreeGrid.create({
ID: “employeeTree”,
width: 500,
height: 400,
dataSource: “employees”,
customIconProperty:“treeGridIcon0”,
nodeIcon:“icons/16/unchecked.png”,
folderIcon:“icons/16/checked.png”,
showOpenIcons:false,
showDropIcons:false,
closedIconSuffix:“”,
nodeClick: function(){
employeeTree.customIconProperty=“treeGridIcon1”;
employeeTree.redraw()
},
data: isc.Tree.create({
modelType: “parent”,
rootValue: “1”,
nameProperty: “Name”,
idField: “EmployeeId”,
parentIdField: “ReportsTo”,
data: employeeData
}),
fields: [
{name: “Name”, formatCellValue: “record.Job+': '+value”}
]
});
and here is my data source variables:
employeeData = [
{
EmployeeId:“4”, ReportsTo:“1”, Name:“Charles Madigen”, Job:“Chief Operating Officer”,
Phone:“x10962”, Email:"cmadigan@server.com", OrgUnit:“Management”, Salary:26200.00,
Gender:“male”, MaritalStatus:“married”, EmployeeType:“full time”, EmployeeStatus:“active”,
isOpen: true
},
{
EmployeeId:“189”, ReportsTo:“4”, Name:“Gene Porter”, Job:“Mgr Tech Plng IntIS T”,
Phone:“x30358”, Email:"gporter@server.com", OrgUnit:“Management”, Salary:18100.00,
Gender:“female”, MaritalStatus:“married”, EmployeeType:“contract”, EmployeeStatus:“LOA”, treeGridIcon0:“icons/16/checked.png”, treeGridIcon1:“icons/16/unchecked.png”
},
.
.
.
Thank U for being so kind