I have a situation where the data coming in because of the data coming from two separate tables can have the same ID. The ID is mapped to the NodeID (DataFieldID) of the tree view. Because of this I can have two nodes with the same id. Instead of changing my data model converting the ID (int) to a ID (GUID) I would like to see if there is a mechanism in the TreeView where I can check to see if when adding a node check to see if the parent node is accepting a child or not. The below structure represents my tree structure.
When tree evaluates Node 75 with ParentID 37, I want it at the bottom node as it’s a folder vs the first 37 as it not a node that can have children.
NodeID 75
ParentID 37
NodeID 18
ParentID null
NodeID 69
ParentID 18
NodeID 56
ParentID 18
NodeID 37 ß I don’t want it here
Parent 18
NodeID 1
Parent 18
NodeID 12
Parent 18
NodeID 26
Parent 18
NodeID 37 ß I want it here
ParentID 18
Is there an event I can write code for to interrogate the node to see if I can add a child?