I am currently working on implementing a dynamic user access feature for specific nodes within an existing treeview that is also dynamic.
The primary TreeView that I am using contains checkboxes and gets populated from a database. Additionally, there is a separate table in the database where the user access settings for this TreeView are stored.
However, I have encountered an issue while trying to set the user access permissions. The main treeview does not support "3-state checkboxes," and certain Nodes' Ref-IDs are not included in the postback. I have been utilizing the following JavaScript code:
Treeview in web form check child nodes on parent node check
It is not feasible for me to rebuild a new treeview based on the data from the postback due to missing Parent Node (Ref-Node) information that is excluded from the postback.
The issue I am facing can be seen in the highlighted image of the treeview below. When deselecting cabinet 2, room 2 gets deselected as expected. However, Location 1 and Demotop also get unchecked because the reference Node to Room1 (Location 1) is not considered in the checked checkboxes during the action, causing the reference in the database to be lost.
[ []