How to use propertyModified in DataInspector Js file?

I want to use propertyModified property which is haing a call back function so that I want to modify the “text” value of a Node.
I might be doing syntax error so its not happening for me.
Please give an example for propertyModified to change the property value from outside goJS Diagram.

What did you try? What did you want to do and when?

I want to update the text property value of a Node on the selection changed event of a DropDown, dropdown is not part of goJS Diagram.
The value to update the Text property should come from the value of selected dropdown item.

Generally to modify the value of a node, you should use a data-binding and:

myDiagram.model.setDataProperty(node.data, property, value);

You do not need to use any data inspector code to do this.

And in the function you mentioned
myDiagram.model.setDataProperty(node.data, property, value);

how will I get ‘node’ object out of multiple nodes on which I want to modify the property?

It depends on your criteria for the nodes.

You can use myDiagram.nodes to get an iterator of all nodes, or myDiagram.selection for an iterator of all Parts that are selected. For example you could do:

myDiagram.startTransaction();
myDiagram.nodes.each(function(p) {
  if (!(p instanceof go.Node)) return;
  myDiagram.model.setDataProperty(p.data, "color", "lime");
});
myDiagram.commitTransaction();

To turn all of the Nodes in the minimal.html sample lime green.

You can find specific nodes by key with myDiagram.findNodeForKey(), see also this tutorial on programmatic interaction with GraphObjects.

Thanks a lot. That helped. :)