InObtain the value of the primary key in gridview1_rowcommand:
Protected void gridview1_rowcommand (Object sender, gridviewcommandeventargsE)
{
Int orderid = convert. toint32 (gridview1.datakeys [convert. toint32 (E. commandargument)]. value );}
InObtain the value of the primary key in gridview1_pageindexchanging
Protected void gridview1_pageindexchanging (Object sender, gridviewpageeventargs E)
{
Int Index = gridview1.datakeys [E. newpageindex]. value;
}
InObtain the value of the primary key in gridview1_rowdeleting
Protected void gridview1_rowdeleting (Object sender, gridviewdeleteeventargs E)
{
Int Index = gridview1.datakeys [E. rowindex]. value;
}
InObtain the value of the primary key in gridview1_rowediting
Protected void gridviewinclurowediting (Object sender, gridviewediteventargs E)
{
Int Index = gridview1.datakeys [E. neweditindex]. value;
}
InObtain the value of the primary key in gridview1_rowupdating.
Protected void gridview1_rowupdating (Object sender, gridviewupdateeventargs E)
{
Int Index = gridview1.datakeys [E. rowindex]. value;
}
InObtain the value of the primary key in gridview1_rowdatabound.
Protected void gridview1_rowdatabound (Object sender, gridviewroweventargs E)
{
Int Index = gridview1.datakeys [E. Row. rowindex]. value;
}