The problem is with the order of the checked
and value
bindings. The checked
binding uses the element's value to determine whether it should be checked or not. When the element is first bound, the value is set by the value
binding after the checked
binding is initialized. So the simplest fix is to re-order the bindings. Also I'd suggest you use the attr
binding instead of value
since value
has extra overhead (it's a two-way binding designed for text boxes).
data-bind="attr: {value: $data}, checked: $parent.value"
http://jsfiddle.net/mbest/d3YJc/2/
Knockout 3.0 fixes the order problem also (in addition to the rendering issue mentioned in the comments), so that's another way to solve this.