Our TreeGrid has a search filter which calls this method
var aCriteria = {
_constructor: "AdvancedCriteria",
operator: "and",
criteria: [
{ fieldName: "EntityName", value:entityFilterFindForm.getValue("find"), operator: "iContains" }
]
};
this.creator.entityFilterTree.setCriteria(aCriteria);
This works great to show the target node and all parents of the target node. Unfortunately this gives the illusion that the target node has no children, is it possible to still offer the ability to expand children of the target node?
UPDATE
The solution we had was to include a pipe delimited value of ancestors coming out of SQL and include that parameter in our criteria to search. That way the children of our search result would be included because the search string was found in their ancestor string.
I've never tried it, but reading the docs for Tree.getFilteredTree I see a parameter 'filterMode', which has two valid values:
Maybe keepParents could work for your use case?Sorry, I just realized you already have parents, but you want children. Did you already try a call to Tree.loadChildren or reloadChildren ?