Getting Row or RowIndex from the event of control placed inside a gridview row.

Posted by Ndebata under ASP.NET category on | Points: 40 | Views : 3492
Lets say there is a button or linkbutton or dropdowncontrol inside a gridview row which has registered some event in the format)
protected Control_Event(object sender,EventArgs e)
GridViewRow currentgridrow = (GridViewRow)(((Control)sender).Parent.NamingContainer);
//Hence you can find every thing related to that gridrow.

Comments or Responses

Login to post response