Is it possible to display leaf nodes in a treeGrid when filtering on data at a mid-level node?
Let’s say I have a treeGrid that represents the table of contents for a book. The book has many volumes, the volumes have chapters, the chapters have sections, and the sections have pages. I want to be able to filter the tree on data specified at the volume level, but I still want the tree to display all the descendants of the volumes that match the filter. So, I still want to see the chapters, sections, and pages below the volumes that match the filter. Is there a way to do this (without having to specify the filter data on each of the leaf nodes below the volume level)?
For this implementation, I was planning to set the filtration level at all nodes. Even when I set the filtration level at all nodes, only the nodes (and ancestor nodes) that match the filter are displayed.
I verified that setting filtration level to 1 does show the descendants of that level when filtering. I believe 1 means ‘second level’. I need to be able to filter on any level of the tree, and still show the descendant nodes after filtering. So, I am trying to use mygrid.setFiltrationLevel(-2)
Is there any way to show the descendant nodes when filtering on all levels?
Is there any way to show the descendant nodes when filtering on all levels?
Unfortunately it is not possible. If you filter treeGrid by all levels, nodes that do not pass filter rules are hidden.
Is there an example showing how to search at all levels and see all the leaf nodes when the parent matches? If not, could this effect be accomplished by appending parent text to the leaf node filtered value or opening the parent node when the filter search is completed?
We accomplished this by modifying our custom excell as follows:
having getValue return the excell instance (this)
adding a getFilterValue method to perform the getValue functionality
We used a custom filter to return true for sub-nodes whose parent getFilterValue matched the filter string.
In latest version of dhtmlxTreeGrid (3.5) it possible to configure filters to search on some specific level of tree only, and show all childs items of matched folders