Support,
Using your website Feature Explorer, Safari Version 9.0.1 (11601.2.7.2).
I'm having trouble getting TreeGrid to filter correctly. Paste the code below into the feature explorer and please notice that it *almost* works.
To test:
1. click the load button because I'll need to load the data *after* initialization. Further, I'll load different data during the life of the TreeGrid.
2. enter filter text and notice that nodes are not pruned correctly. Some nodes do, but others don't.
3. Also notice that I can't get openAll to work correctly on first fetchData()
Here is the code:
var myData = [
{ EmployeeId:"4", ReportsTo:"1", Name:"Charles Madigen" },
{ EmployeeId:"188", ReportsTo:"4", Name:"Rogine Leger" },
{ EmployeeId:"189", ReportsTo:"4", Name:"Gene Porter" },
{ EmployeeId:"265", ReportsTo:"189", Name:"Olivier Doucet" },
{ EmployeeId:"264", ReportsTo:"189", Name:"Cheryl Pearson" }
];
isc.setAutoDraw( false );
isc.VLayout.create({
autoDraw:true, width:"100%", height:"100%",
members:[
isc.Button.create({
title: "Load",
click: function() {
MyTree.dataSource.setCacheData( myData );
MyTree.fetchData();
}
}),
isc.TreeGrid.create({
ID: "MyTree",
initWidget: function(arguments) {
this.Super( "initWidget", arguments);
this.dataSource = isc.DataSource.create( {
clientOnly: true,
keepParentsOnFilter: true,
fields: [
{ name: "Name" },
{ name: "EmployeeId", primaryKey:true },
{ name: "ReportsTo", foreignKey:"EmployeeId" }
]
});
},
autoFetchData: false,
dataFetchMode: "local",
loadDataOnDemand: false,
dataProperties:{
dataArrived:function (parentNode) {
this.openAll();
}
},
showFilterEditor: true,
filterOnKeypress: true,
filterLocalData: true,
fields: [
{ name: "Name", canFilter:true }
]
})
]
});
Thanks in advance, and all the best.
Mitch
Registered, and support is being renewed now. Invoice in hand.
Using your website Feature Explorer, Safari Version 9.0.1 (11601.2.7.2).
I'm having trouble getting TreeGrid to filter correctly. Paste the code below into the feature explorer and please notice that it *almost* works.
To test:
1. click the load button because I'll need to load the data *after* initialization. Further, I'll load different data during the life of the TreeGrid.
2. enter filter text and notice that nodes are not pruned correctly. Some nodes do, but others don't.
3. Also notice that I can't get openAll to work correctly on first fetchData()
Here is the code:
var myData = [
{ EmployeeId:"4", ReportsTo:"1", Name:"Charles Madigen" },
{ EmployeeId:"188", ReportsTo:"4", Name:"Rogine Leger" },
{ EmployeeId:"189", ReportsTo:"4", Name:"Gene Porter" },
{ EmployeeId:"265", ReportsTo:"189", Name:"Olivier Doucet" },
{ EmployeeId:"264", ReportsTo:"189", Name:"Cheryl Pearson" }
];
isc.setAutoDraw( false );
isc.VLayout.create({
autoDraw:true, width:"100%", height:"100%",
members:[
isc.Button.create({
title: "Load",
click: function() {
MyTree.dataSource.setCacheData( myData );
MyTree.fetchData();
}
}),
isc.TreeGrid.create({
ID: "MyTree",
initWidget: function(arguments) {
this.Super( "initWidget", arguments);
this.dataSource = isc.DataSource.create( {
clientOnly: true,
keepParentsOnFilter: true,
fields: [
{ name: "Name" },
{ name: "EmployeeId", primaryKey:true },
{ name: "ReportsTo", foreignKey:"EmployeeId" }
]
});
},
autoFetchData: false,
dataFetchMode: "local",
loadDataOnDemand: false,
dataProperties:{
dataArrived:function (parentNode) {
this.openAll();
}
},
showFilterEditor: true,
filterOnKeypress: true,
filterLocalData: true,
fields: [
{ name: "Name", canFilter:true }
]
})
]
});
Thanks in advance, and all the best.
Mitch
Registered, and support is being renewed now. Invoice in hand.
Comment