views:

99

answers:

1

How do I set the EditIndex property of the GridView from the RowCommand event?

Cheers

+1  A: 

You can use this code to set the EditIndex property:

protected void gridView_RowCommand(object sender, GridViewCommandArgs e)
{
   gridView.EditIndex = gridView.SelectedIndex;
}
Jose Basilio