title: ASP.Net CustomValidator in GridView is not fired
body: <p>I got a Gridview in an UpdatePanel with this EditTemplate:</p>
  
  <pre><code>&lt;edititemtemplate&gt;
      &lt;asp:textbox id="txtDistFrom" runat="server" text='&lt;%# Bind("distFrom") %&gt;' width="30" /&gt;
      &lt;asp:CustomValidator ID="valDistFrom" ValidateEmptyText="True" OnServerValidate="valDistFromTo_ServerValidate" ControlToValidate="txtDistFrom" Text="Missing" ToolTip="Invalid" Display="Dynamic" runat="server" /&gt;
  &lt;/edititemtemplate&gt;
  </code></pre>
  
  <p>And a simple Server-side function:</p>
  
  <pre><code>Protected Sub valDistFromTo_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs)
      Dim cv As CustomValidator = CType(source, CustomValidator)
      Dim gvr As GridViewRow = cv.NamingContainer
      Dim tbV As UI.WebControls.TextBox = gvr.FindControl("txtDistFrom")
      If tbV.Text &lt;&gt; "" Then
          args.IsValid = False
          cv.ErrorMessage = "inhalt ist " &amp; tbV.Text
      End If
  End Sub
  </code></pre>
  
  <p>But when debugging this code the server-side function is not fired, whatever it does. It seems it has to do with the gridview, so I cannot access the control directly by its id. Any suggestions?</p>