Answer for First Question
From MSDN :
Quote:
Occurs when a button is clicked in a GridView control
(Means fires when any of the Buttons like Edit, Cancel,Update etc.)
And to know which ButtonClick has triggered the event, need to set the CommandName for the Button and check inside the Event.
EX:
if(e.CommandName=="Edit")
{
//Code For Edit.
}
Second :
Quote:
Occurs when a row's Select button is clicked, but after the GridView control handles the select operation.
Its useful when need to retrieve the Gridview Selected Row value with the selectedIndex.
Refer MSDN
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.rowcommand(v=vs.110).aspx[
^]
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.selectedindexchanged(v=vs.110).aspx[
^]
And follow some examples.