28
Chapter 1: Getting Started
8.
Set up DataGrid’s listener object to update the details TextArea:
gridChange = new Object();
gridChange.change = function(evt)
{
// when the selectedIndex changes in DataGrid, a change event will be fired.
// The details should be updated.
details.text = evt.target.selectedItem.description;
}
grid.addEventListener("change", gridChange);