To setup selection for the grid, I changed the grid
definition to the following:
<asp:GridView … AutoGenerateSelectButton="true"
To select the grid when the grid is bound manually, the
SelectedIndexChanging event needs handled so that the grid can be rebound to
show the current selected item.
protected void gvwOrders_SelectedIndexChanging(object sender,
GridView grid = (GridView)sender;
HiddenField customerKeyField = (HiddenField)grid.FindControl("hdnCustomerKey");
this.BindGrid(grid, new Guid(customerKeyField.Value));
Using the BindGrid refactoring, passing in the grid works
well to incorporate two scenarios. However, you do not really need to handle
the selection approach from the grid (in a manual bind scenario).