title: How do I get a reference to a telerik:GridTemplateColumn from a child control?
body: <p>Simplified code from page:</p>
  
  <pre><code>&lt;%@ Page Language="C#" etc... %&gt;
  &lt;%@ Register src="~/controls/RequiredField.ascx" tagname="rf" tagprefix="custom" %&gt;
  
  &lt;telerik:RadGrid runat="server"&gt;
      &lt;MasterTableView&gt;
          &lt;Columns&gt;
              &lt;telerik:GridTemplateColumn DataField="Name" HeaderText="Name" SortExpression="Name"&gt;
                  &lt;ItemTemplate&gt;&lt;%#Eval("Name")%&gt;&lt;/ItemTemplate&gt;                    
                  &lt;EditItemTemplate&gt;
                      &lt;asp:TextBox ID="NewName" runat="server" Text='&lt;%#Bind("Name")%&gt;'&gt;&lt;/asp:TextBox&gt;
                      &lt;custom:rf runat="server" /&gt;
                  &lt;/EditItemTemplate&gt;
              &lt;/telerik:GridTemplateColumn&gt;
          &lt;/Columns&gt;
      &lt;/MasterTableView&gt;
  &lt;/telerik:RadGrid&gt;
  </code></pre>
  
  <p>In my control, I want to check if the parent is an <code>EditItemTemplate</code> and then set a property of the <code>telerik:GridTemplateColumn</code>. For example:</p>
  
  <pre><code>public partial class controls_RequiredField : System.Web.UI.UserControl
  {
      protected void Page_Load(object sender, EventArgs e)
      {
          if (this.Parent is Telerik.Web.UI.GridEditFormItem.EditFormTableCell)
          {
              // how do I get a reference to 'Telerik.Web.UI.GridTemplateColumn' (or any other object that lets me set the header text)
              ((Telerik.Web.UI.GridTemplateColumn)this.Parent.Parent).EditFormHeaderTextFormat = "{0}:" + RequiredText.Text;
              RequiredText.Visible = false;
          }
      }
  }
  </code></pre>