yskeat
yskeat

Reputation: 17

Access non object in observableArray

Refer to this example. I got an array named Header (store name for table header) and another array named Type (store class name for each column). I wonder how to get access to the Type array using Header index.

Upvotes: 0

Views: 48

Answers (1)

Tom W Hall
Tom W Hall

Reputation: 5283

It appears that in a binding expression like that you need to call $index with brackets, i.e.:

$root.Type()[$index()]

Updated fiddle: http://jsfiddle.net/KuzGf/1/

Upvotes: 1

Related Questions