row.FindControl doesnt work for controls inside the edititemtemplate

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dotneto
    New Member
    • Feb 2007
    • 36

    row.FindControl doesnt work for controls inside the edititemtemplate

    Hi, I have a gridview with some templatecolumns , I need to retrieve the value from a textbos inside a edititemtemplat e in the rowupdating event. I can get other controls using findcontrol method in the current gridviewrow, but It always returns null when I try to access the controls inside the edititemtemplat e. I'm not using objectdatasourc e, just a plain grid and I'm doing this to bind the grid:

    Code:
            If Not Page.IsPostBack Then
                BindPurgingGrid()
            End If
    If the grid is in a page without master page it works. I've tried all posibles ids combination but nothing seems to work. I looked the source code in IE, and copied the ID and then used it hardcoded int the findcontrol without any success.

    Thanks.
Working...