Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Detect row of a textbox inside a gridview

Posted on 2007-11-29
1
Medium Priority
?
438 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 1000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

824 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