I would like to get the index of the current row at the PreRender event.
How can i do it?
Protected Sub GridView1_PreRender(sender As Object, e As System.EventArgs) Handles GridView1.PreRender
Dim idx as integer =...
End Sub
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The PreRender event does not relate to any specific row in the GridView control (like the RowDataBound for example). As such there is no current row to retrieve.
The PreRender event can be used perform any updates before the server control is rendered to the page.
What is it you are trying to achieve?