This example expands upon the XML Grid example and shows how to implement data binding for a master-detail view.
Note that the js is not minified so it is readable. See binding.js.
You can find a more advanced example of the same code which abstracts each piece of this simple application into multiple classes in Data Binding Example - Implemented with classes.