Solved

Detect row of a textbox inside a gridview

Posted on 2007-11-29
1
354 Views
Last Modified: 2013-11-07
I have a gridview, the first templatefield column of which is a hyperlink followed by several columns containing textboxes. If I Make a change in any textbox, I can detect the changed value via the textbox's OnTextChanged event, but I need to detect which row of the gridview the changed textbox is in so I can use it to get the corresponding data from the row's link.
0
Comment
Question by:CaptCredence
1 Comment
 
LVL 10

Accepted Solution

by:
digitalZo earned 250 total points
ID: 20380090
Source: http://www.wherecanibuyit.co.uk/ASP/fully_editable_gridview.html
protected void TextBox_TextChanged(object sender, EventArgs e)

{

TextBox thisTextBox = (TextBox)sender;

GridViewRow thisGridViewRow = (GridViewRow)thisTextBox.Parent.Parent;

int row = thisGridViewRow.RowIndex;

rowChanged[row] = true;

}

Open in new window

0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Read about why website design really matters in today's demanding market.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now