I can bind to name and type but looks like I don’t have access to entries. To explain a little what I’m doing, I have a table and its itemArray is bound to entries. I set the itemTemplate in the table to a tableRow that contains a textBlock, and I am trying to add the binding above to that textBlock. Is it possible for me to bind to entries in this situation?
sorry that was confusing. I have a table like this below, and I want to bind a property of the TextBlock in the TableRow to the length of elements in the entries in the nodeDataArray. I can successfully bind in the TableRow to name and type but not entries.
So when there are a lot of entries, the TextBlocks would be short, and when there are few of them, they would be a bit taller. But you aren’t changing the font size, so you are just changing the apparent spacing between the rows.
I don’t understand what you are trying to do. The default behavior, since you set stretch: go.GraphObject.Fill on the Table Panel, would be to allocate extra vertical space to each row if there is enough space for all of the rows. If there isn’t enough for all of the rows, each row would be sized normally and the bottom rows would be clipped. You can see that behavior when you resize the node in this code:
I’m more asking how it is possible to bind to the entries in the code I have, because I don’t know how to access it from inside the itemTemplate. I have more things in my actual itemTemplate that I removed because it isn’t relevant to the question. The binding I sent for the height doesn’t work because I can’t access entries. Does that make sense? I just want to know what I could pass in as the second argument in the binding for me to get the length of the entries array. Sorry I am not explaining this very well
Note that if the length of the entries Array changes, even by calling methods such as Model.addArrayItem, the Bindings will not be re-evaluated, because the binding system cannot know about the implicit dependencies present in your conversion functions.
Well, if you replace the whole data.entries Array by calling Model.set on the node data object with the “entries” property, that could work.