Click here to Skip to main content
15,884,838 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
sir, i have a gridview in which a AutoCompleteExtender textbox. when i change the text of textbox i need to store gridview row index in a variable.. how can i do it.
Posted
Comments
On client side or server side? Which event? Can you show the code?
[no name] 31-May-14 6:25am    
you can bind row index in a hiddenfield at the time of rowdatabound

1 solution

Try this:
VB
Protected Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As EventArgs)
    Dim txt As TextBox = DirectCast(sender, TextBox)
    Dim row As GridViewRow = DirectCast(txt.Parent.Parent, GridViewRow)
    Dim rowIndex As Int32 = row.RowIndex
    Debug.WriteLine(rowIndex)
End Sub
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900