Regarding edit on gridview in the same page

I have a one form when i click the save button it will save in db and bind with gridview, when i press the edit button of gridview it bind with in the above form and when i update it, it will updated.

how can i do it,any one explian me....