Change node text by click

hi, i want to change a nodes text on click of button i without rebuildParts

for (var i = 0; i < myDiagram.model.nodeDataArray.length; i++) {
myDiagram.model.nodeDataArray.text = “aa”+i

i want to change it without rebuildParts there is any function to do it?


How have you defined your Node template? Do you have a Binding on TextBlock.text to the “text” property of the node data? (There are lots of examples of this throughout the samples.)

If so, then you just need to do something like:
var arr = myDiagram.model.nodeDataArray;
for (var i = 0; i < arr.length; i++) {
var data = arr[i];
myDiagram.model.setDataProperty(data, “text”, “aa” + i);