I would like to know if it’s possible to use the control find/search command (controller.find(); term = search term; controller.search(true,true) to highlight a child node in a DBTreeView while expanding the above tree?
Basically expanding a tree to expose a child containing the searched item.
Yes, certainly, a treeview is normally data-driven. With one or two columns specifying the node id’s and a column for the content. By searching on the content you will find the record containing the node id’s and will know which node(s) to highlight.
Seems Omar is going after the un-answered threads in the forum.
I commend him for it
@howellba
You might want to look at the slides of a preso I did at ServoyWorld in 2008 about working with hierachical data and the DbTreeView bean.
The preso and code is based on a blog post of PostgreSQL community member Hubert Lubaczewski (a.k.a. depesz).
Hope this helps.
Thanks Robert, there are actually some interesting topics in there and some of them may have snowed under at the time but are still quite relevant. So let’s all grab an unanswered question every now and then.
The data table for the dbtree i’m working with has only one item in the data table, and is loaded as the dataSource of the form - the remaining child folder data resides in a different table.They are linked by a relation that has the parent id = child id and prevents showing anything but a single item at the top level - then as you click on +nodes the child levels are exposed based on the relationship equation.
Search seems to only work on the data table loaded by the form and i don’t know a way to tell the search to find something on the child data table since it only gets loaded based on the relation parent id = child id.
I’m assuming search would work fine if i had a single dataSource table for the full tree and a relation equation that gave me the top down tree results i’m looking for but i haven’t pursued this yet - was waiting to hear back for what can be done.