Get reference to parent data property from itemArray for binding

Hi,
I followed this post: [Get reference to parent object in model from itemArray for binding]
Here’s code (the itemTemplatepart):

[...]
	    				    				  itemTemplate:
	    				    					  $gj(go.Panel,
	    				    							  {
	    				    						  _side: "right",
	    				    						  fromSpot: go.Spot.Right, toSpot: go.Spot.Right,
	    				    						  fromLinkable: false, toLinkable: false, 
	    				    						  cursor: "pointer"
	    				    						  //contextMenu: portMenu
	    				    							  },
	    				    							  new go.Binding("portId", "portId"),
	    				    							  $gj(go.Shape, "Rectangle",
	    				    									  {
	    				    								  stroke: null, strokeWidth: 0,
	    				    								  desiredSize: portSize,
	    				    								  margin: new go.Margin(3, 0),
	    				    								  //fill: "blue"
	    				    									  }
new go.Binding("fill", "color", function(color, shape) { return shape.part.data.horiz; })
	    				    							   ),
[...]

the data example:

{"isGroup":true, "text":"Prodotto", "loc":"572.0456949966161 150.04569499661574", "horiz":"#33D3E5", "rightArray":[ {"portId":"Ambito", "checked":true},{"portId":"Scalo", "checked":true},{"portId":"Profit", "checked":true} ], "source":"/FILL_EM/img/mult.png", "key":-1, "group":-4}

The code does not work. No error but the shapes around ports remain black. What I try to do is simply to get the “horiz” property, that contains the color, and use it to fill the color of the box around ports in the group.
Any helps?
thx

Your Binding specifies that the source property is “color”, yet you have no “color” property on any of your item data objects. So the binding is never evaluated.

Try this instead. It’s inefficient, but I think it will work.

new go.Binding("fill", "", function(x, shape) { return shape.part.data.horiz; })

It works perfectly!
Thx
ciao
F