Let me explain you.You tried to fill gridview at the time of updating,that means there would be no data at the time of editing.so you have to first fill your gridview with data.Make function say fillgrid(),and bind your gridview here for first time. When you call your row editing event(
),make change like this
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
GridView1.EditIndex = e.NewEditIndex;
This will work.