diagram.model = go (TreeModel, {nodeKeyProperty: 'id'})
diagram.model.nodeDataArray = data
Now my requirement is to be able to update to the node by directly modifying the data. Don’t ask me why. When I use model.setDataProperty (node, key, value) it doesn’t work. Because the data is already up-to-date.
OK, if you want to directly modify the properties of a node data object, i.e. without calling Model.setDataProperty, then you can call Part.updateTargetBindings on the corresponding Node. Part | GoJS API
You will need to call this method, perhaps once for each of several nodes, within a transaction. If you are changing most of the nodes, you could instead call Diagram.updateAllTargetBindings on the Diagram. Diagram | GoJS API
BUT please realize that by setting the properties directly there will be no record of any previous value(s), the user will not be able to undo or redo those changes.