Trouble getting correct selections in Hierarchy Treeview
I've created a hierarchy displayed as a treeview.
When a user clicks on a parent all children are automatically selected.
This seems to work well, however a problem occurs when a user has clicked on a leaf node (one selected value) and after that uses CTRL and selects an additional value. In that case the new value(s) will not be selected.
(.. but if the user uses CTRL and remove the leaf node and selects 2 or more new items it works....)
Solution anyone? See attached .qvw file. I'm using QV 11.20
I've been using some trigger actions and a variable to accomplish the task so far.
Re: Trouble getting correct selections in Hierarchy Treeview
I would avoid triggers. It is much better to build this kind of logic into the data model. In your case, you could add a "Trees" table to your data model and make the selection there instead. Then you would select entire sub-trees.
Re: Re: Trouble getting correct selections in Hierarchy Treeview
I agree with henric. When you select the top of a hierarchy, all tyhe children are selected anyway in the Belongsto table (so all the Akt_Foreldrenavn are selected). So the best option is to design the app around this hierarchical funcationality
Having said that, your triggers seem to work fine on my machine (QV10 sr6?)