I do this scenario a fair bit (select an item from a grid and edit it.) Here's what I do.
First, my view model contains the list, it is not the list itself. This allows me to easily add other properties and methods. So, it would look like:
function viewModel() {
var self = this;
self.list = ko.observableArray([]);
self.selectedItem = ko.observable();
}
You could prepopulate the array, or you could use another function to get the items.
So, the grid is bound to the list, like so:
<tbody data-bind="foreach: list">
The textareas are bound to the selected item using the "with" binding, like so:
<div data-bind="with: selectedItem"><textarea data-bind="textInput: description"></textarea></div>
Finally, you need a method to set the selectedItem from the grid. I use a click event on the TR element, but you could really use anything. So, the HTML is:
<tr data-bind="click: $root.editItem">
Then you need to implement this method in the view model:
function viewModel() {
var self = this;
self.list = ko.observableArray([]);
self.selectedItem = ko.observable();
self.editItem = function(item) {
self.selectedItem(item);
}
}