void MyDataGrid_Update(Object sender, DataGridCommandEventArgs e)
{
// Get the text box that contains the price to edit.
// For bound columns the edited value is stored in a text box.
// The text box is the first control in the Controls collection.
TextBox priceText = (TextBox)e.Item.Cells[3].Controls[0];
// Get the check box that indicates whether to include tax from the
// TemplateColumn. Notice that in this case, the check box control is
// second control in the Controls collection.
CheckBox taxCheck = (CheckBox)e.Item.Cells[2].Controls[1];