0
<script type="text/javascript">
 var initialData = <%= new JavaScriptSerializer().Serialize(Model) %>;
 var viewModel = {
 variables: ko.observable(initialData.Variables),
 //...
};
$(document).ready(function(){ko.applyBindings(viewModel);});
</script>


<body>
<table data-bind="with:variables">
<tr><td><input data-bind="value: description"/></td></tr>
<tr><td><input data-bind="value: description"/></td></tr>
</table>
</body>

When updating the first row, the second row is not updated. What is the problem?

VekeV
  • 1

1 Answers1

0

Each of the properties needs to be an observable itself. Check out ko.mapping.fromJS.

Jason Goemaat
  • 28,692
  • 15
  • 86
  • 113