Advertisement

10.12.2007 at 11:10AM PDT, ID: 22890231
[x]
Attachment Details

Gridview Findcontrol

Asked by stretch73 in .NET Framework 2.0, Visual Studio .NET 2005

Tags: gridview, findcontrol

I'm using the following code to find a textbox:

txtM1Amt = e.Row.Controls(4).FindControl("txtM1Amt_add")

I inherited this application and I'm just curious as to how it works.  I follow that the row has a controls collection but I don't understand what controls are included.  If the user clicks "Edit" on this row and it brings up the update and cancel buttons, how does that affect the count of the controls.  I have this same code in the footer row and it works fine, not the case in the actual grid.

Thanks in advance,

NStart Free Trial
[+][-]10.12.2007 at 11:17AM PDT, ID: 20067918

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .NET Framework 2.0, Visual Studio .NET 2005
Tags: gridview, findcontrol
Sign Up Now!
Solution Provided By: SQL_SERVER_DBA
Participating Experts: 1
Solution Grade: A
 
 
[+][-]10.12.2007 at 11:50AM PDT, ID: 20068185

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628