How to get Gridview Selected Row-Index?

 Posted by vishalneeraj-24503 on 11/22/2013 | Category: ASP.NET Interview questions | Views: 3578 | Points: 40

With the help of Container.DataItemIndex, we can get Gridview Slected Row index.

For Example:-

In the ItemTemplate of Gridview, we can write:-

<asp:Button Id="btn_row_index" CommandName="View_Details"
CommandArguments = '<%# Container.DataItemIndex %>' Text="View Details"></asp:Button>

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response