title: AddHandler is not working
body: <p>Why is my addhandler not firing?</p>
  
  <p>In the Sub "CreateTagStyle", the AddHandler is not firing when the LinkButton is clicked. Is there some reason that addhandlers can't be added at certain points of the page lifecycle?</p>
  
  <pre><code>&lt;%@ Page Title="" Language="VB" MasterPageFile="~/_Common/Admin.master" %&gt;
  
  &lt;script runat="server"&gt;
  
      Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
  
      End Sub
  
      Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs)
          If Not e.IsFromDetailTable Then
              Dim forms As New MB.RequestFormPacket()
              RadGrid1.DataSource = forms.GetPackets()
          End If
      End Sub
  
      Protected Sub RadGrid1_DetailTableDataBind(ByVal source As Object, ByVal e As Telerik.Web.UI.GridDetailTableDataBindEventArgs)
          Select Case e.DetailTableView.Name
              Case "gtvForms"
                  Dim PacketID As Guid = e.DetailTableView.ParentItem.GetDataKeyValue("ID")
                  e.DetailTableView.DataSource = MB.RequestForm.GetRequestForms(PacketID)
          End Select
      End Sub
  
      Protected Sub RadGrid1_InsertCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs)
          If IsValid Then
              Select Case TryCast(e.Item.NamingContainer.NamingContainer, GridTableView).Name
                  Case "gtvPackets"
                      Dim rtbName As RadTextBox = TryCast(e.Item.FindControl("rtbName"), RadTextBox)
                      Dim IsActive As Boolean = TryCast(e.Item.FindControl("cbxIsActive"), CheckBox).Checked
  
                      Dim packet As New MB.RequestFormPacket()
                      packet.Name = rtbName.Text
                      packet.IsActive = IsActive
                      packet.Insert()
  
                      e.Canceled = True
                      e.Item.OwnerTableView.IsItemInserted = False
                      RadGrid1.Rebind()
                      System.Web.UI.ScriptManager.RegisterStartupScript(Me.Page, Me.GetType(), "ClientMessage", "SuccessMessage('Request Form Packet has been added successfully.');", True)
                  Case "gtvForms"
                      Dim parentItem As GridDataItem = e.Item.OwnerTableView.ParentItem
                      Dim rcbForms As RadComboBox = TryCast(e.Item.FindControl("rcbForms"), RadComboBox)
  
                      Dim rf As New MB.RequestForm()
                      rf.RequestFormPacketID = CType(parentItem.OwnerTableView.DataKeyValues(parentItem.ItemIndex)("ID"), Guid)
                      rf.FormID = rcbForms.SelectedValue
  
                      If MB.RequestFormPacket.HasItems(rf.RequestFormPacketID) Then
                          rf.SortOrder = rf.MaxSortOrder + 1
                      Else
                          rf.SortOrder = 0
                      End If
  
                      rf.Insert()
  
                      e.Canceled = True
                      e.Item.OwnerTableView.IsItemInserted = False
                      TryCast(e.Item.NamingContainer.NamingContainer, GridTableView).Rebind()
              End Select
          End If
      End Sub
  
      Protected Sub RadGrid1_UpdateCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs)
          If IsValid Then
              Select Case TryCast(e.Item.NamingContainer, GridTableView).Name
                  Case "gtvPackets"
                      Dim PacketID As Guid = CType(CType(e.CommandSource, Button).NamingContainer, GridEditFormItem).GetDataKeyValue("ID")
                      Dim Name As String = TryCast(e.Item.FindControl("rtbName"), RadTextBox).Text
                      Dim Tags As String = TryCast(e.Item.FindControl("hdnTags"), HiddenField).Value
                      Dim IsActive As Boolean = TryCast(e.Item.FindControl("cbxIsActive"), CheckBox).Checked
                      Dim rfp As New MB.RequestFormPacket()
                      rfp.Update(PacketID, Name, IsActive)
                      Call MB.RequestFormPacketTag.Insert(PacketID, Tags)
                      e.Item.Edit = False
                      TryCast(e.Item.NamingContainer, GridTableView).Rebind()
                      System.Web.UI.ScriptManager.RegisterStartupScript(Me.Page, Me.GetType(), "ClientMessage", "SuccessMessage('Request Form Packet has been updated successfully.');", True)
                  Case "gtvForms"
                      Dim RequestFormID As Guid = CType(CType(e.CommandSource, Button).NamingContainer, GridEditFormItem).GetDataKeyValue("ID")
                      Dim rcbForms As RadComboBox = TryCast(e.Item.FindControl("rcbForms"), RadComboBox)
                      Dim rf As New MB.RequestForm()
                      rf.Update(RequestFormID, rcbForms.SelectedValue)
                      e.Item.Edit = False
                      TryCast(e.Item.NamingContainer, GridTableView).Rebind()
              End Select
          End If
      End Sub
  
      Protected Sub RadGrid1_DeleteCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs)
          Dim editedItem As GridEditableItem = TryCast(e.Item, GridEditableItem)
          Select Case CType(editedItem.Parent.Parent, GridTableView).Name
              Case "gtvPackets"
                  Dim ID As Guid = CType(CType(e.CommandSource, ImageButton).NamingContainer, GridDataItem).GetDataKeyValue("ID")
                  MB.RequestFormPacket.Delete(ID)
                  System.Web.UI.ScriptManager.RegisterStartupScript(Me.Page, Me.GetType(), "ClientMessage", "NotifyMessage('Request Form Packet has been deleted.');", True)
              Case "gtvForms"
                  Dim ID As Guid = CType(CType(e.CommandSource, ImageButton).NamingContainer, GridDataItem).GetDataKeyValue("ID")
                  MB.RequestForm.Delete(ID)
                  System.Web.UI.ScriptManager.RegisterStartupScript(Me.Page, Me.GetType(), "ClientMessage", "NotifyMessage('Request Form has been removed.');", True)
          End Select
      End Sub
  
      Protected Sub ibnItemUpArrow_Command(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.CommandEventArgs)
          Dim gtv As GridTableView = CType(CType(sender, ImageButton).NamingContainer.NamingContainer, GridTableView)
          Dim ID As Guid = New Guid(e.CommandArgument.ToString())
          Call MB.RequestForm.MoveUp(ID)
          gtv.Rebind()
      End Sub
  
      Protected Sub ibnItemDownArrow_Command(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.CommandEventArgs)
          Dim gtv As GridTableView = CType(CType(sender, ImageButton).NamingContainer.NamingContainer, GridTableView)
          Dim ID As Guid = New Guid(e.CommandArgument.ToString())
          Call MB.RequestForm.MoveDown(ID)
          gtv.Rebind()
      End Sub
  
      Protected Sub RadGrid1_RowDrop(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridDragDropEventArgs)
          If String.IsNullOrEmpty(e.HtmlElement) Then
              If e.DraggedItems(0).OwnerGridID = RadGrid1.ClientID Then
                  If e.DestDataItem IsNot Nothing Then
                      Dim gtv As GridTableView = CType(e.DestDataItem.NamingContainer, GridTableView)
                      For Each gdi As GridDataItem In e.DraggedItems
                          Select Case gtv.Name
                              Case "gtvForms"
                                  MB.RequestForm.DragAndDropReorder(gdi.GetDataKeyValue("ID"), e.DestDataItem.GetDataKeyValue("ID"), IIf(e.DropPosition = GridItemDropPosition.Above, True, False))
                                  gtv.Rebind()
                          End Select
                      Next
                  End If
              End If
          End If
      End Sub
  
      Protected Sub cbxAllowDragAndDrop_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs)
          Dim cbx As CheckBox = CType(sender, CheckBox)
          If cbx.Checked Then
              RadGrid1.ClientSettings.AllowRowsDragDrop = True
              RadGrid1.ClientSettings.Selecting.AllowRowSelect = True
              RadGrid1.ClientSettings.Selecting.EnableDragToSelectRows = True
          Else
              RadGrid1.ClientSettings.AllowRowsDragDrop = False
              RadGrid1.ClientSettings.Selecting.AllowRowSelect = False
              RadGrid1.ClientSettings.Selecting.EnableDragToSelectRows = False
          End If
      End Sub
  
      Protected Sub ibnDisableToggleProcess_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs)
          Dim ibn As ImageButton = CType(sender, ImageButton)
          Dim hdn As HiddenField = CType(ibn.NamingContainer.FindControl("hdnDisableProcessID"), HiddenField)
          Dim status As Boolean = MB.RequestFormPacket.ActivateToggle(New Guid(hdn.Value))
          Dim gtv As GridTableView = CType(ibn.NamingContainer.NamingContainer, GridTableView)
          gtv.Rebind()
          System.Web.UI.ScriptManager.RegisterStartupScript(Me.Page, Me.GetType(), "ClientMessage", "SuccessMessage('Process has been " &amp; IIf(status, "Activated", "Deactivated") &amp; ".');", True)
      End Sub
  
      Protected Function DisplayTagList(ByVal tags As IEnumerable(Of MB.RequestFormPacketTag)) As String
          Dim list As String = ""
          For Each t As MB.RequestFormPacketTag In tags
              list += "&lt;span class=""tags""&gt;" &amp; t.Tag.Name &amp; "&lt;/span&gt;"
          Next
          Return list
      End Function
  
      Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs)
          Select Case e.Item.GetType.Name
              Case "GridEditFormInsertItem"
                  'do nothing
              Case "GridEditFormItem"
                  Dim plh As PlaceHolder = CType(e.Item.FindControl("plhTags"), PlaceHolder)
                  Dim hdn As HiddenField = CType(e.Item.FindControl("hdnTags"), HiddenField)
                  If hdn IsNot Nothing Then
                      Dim gefi As GridEditFormItem = e.Item
                      Dim packet As MB.RequestFormPacket = gefi.DataItem
                      For Each pt As MB.RequestFormPacketTag In packet.RequestFormPacketTags
                          Call CreateTagStyle(plh, hdn, pt.Tag.Name)
                          If hdn.Value = "" Then
                              hdn.Value = "|"
                          End If
                          hdn.Value += pt.Tag.Name &amp; "|"
                      Next
                  End If
          End Select
      End Sub
  
      Protected Sub btnAddTag_Click(ByVal sender As Object, ByVal e As System.EventArgs)
          Dim btnAddTag As Button = sender
          Dim rtbTags As RadTextBox = btnAddTag.NamingContainer.FindControl("rtbTags")
          Dim plhTags As PlaceHolder = btnAddTag.NamingContainer.FindControl("plhTags")
          Dim hdnTags As HiddenField = btnAddTag.NamingContainer.FindControl("hdnTags")
          Dim TagExists As Boolean = False
  
          rtbTags.Text = rtbTags.Text.ToUpper().Trim()
  
          Dim currentTags() As String = Split(hdnTags.Value, "|")
  
          For i As Integer = 1 To currentTags.Count - 2
              Call CreateTagStyle(plhTags, hdnTags, currentTags(i))
          Next
  
          If TagExists = False And String.IsNullOrEmpty(rtbTags.Text) = False Then
              Call CreateTagStyle(plhTags, hdnTags, rtbTags.Text)
              If String.IsNullOrEmpty(hdnTags.Value) Then
                  hdnTags.Value = "|"
              End If
              hdnTags.Value += rtbTags.Text &amp; "|"
              'System.Web.UI.ScriptManager.RegisterStartupScript(Me.Page, Me.GetType(), "ClientMessage", "highlightTag('" &amp; lbn.ClientID &amp; "');", True)
          End If
  
          rtbTags.Text = ""
          rtbTags.Focus()
      End Sub
  
      Public Sub RemoveTag(ByVal sender As Object, ByVal e As EventArgs)
          Response.End()
          Dim lbnSender As LinkButton = sender
          Dim plhTags As PlaceHolder = lbnSender.NamingContainer.FindControl("plhTags")
          Dim hdnTags As HiddenField = lbnSender.NamingContainer.FindControl("hdnTags")
          Response.Write(hdnTags.Value)
          Response.End()
          Dim TagExists As Boolean = False
          Dim currentTags() As String = Split(hdnTags.Value, "|")
          For i As Integer = 1 To currentTags.Count - 2
              Call CreateTagStyle(plhTags, hdnTags, currentTags(i))
          Next
      End Sub
  
      Protected Sub CreateTagStyle(ByVal plh As PlaceHolder, ByVal hdn As HiddenField, ByVal tagName As String)
          Dim lbn As New LinkButton()
          lbn.ID = "lbn_" &amp; hdn.ClientID &amp; "_" &amp; tagName
          lbn.CssClass = "deleteCreateTag"
          lbn.Text = "X"
          AddHandler lbn.Click, AddressOf RemoveTag
          plh.Controls.Add(New LiteralControl("&lt;div&gt;&lt;span class=showTag&gt;" &amp; tagName &amp; "&lt;/span&gt;"))
          plh.Controls.Add(lbn)
          plh.Controls.Add(New LiteralControl("&lt;/div&gt;"))
      End Sub
  
  &lt;/script&gt;
  
  &lt;asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"&gt;
      &lt;style type="text/css"&gt;
          .tags
          {
              border:solid 1px #93AFE5;
              background-color:#F3F7F8;
              margin: 0px 2px 0px 2px;
              padding: 0px 4px 0px 4px;
              font-family:Verdana;
              font-size:10px;
              text-transform:uppercase;
          }
      &lt;/style&gt;
      &lt;script type="text/javascript"&gt;
          function highlightTag(id) {
              $("#" + id).highlightFade({ color: '#FFFF99', speed: 2000, iterator: 'sinusoidal' });
          }
      &lt;/script&gt;
  &lt;/asp:Content&gt;
  
  &lt;asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"&gt;
  
      &lt;telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1" EnableAJAX="false"&gt;
          &lt;AjaxSettings&gt;
              &lt;telerik:AjaxSetting AjaxControlID="RadGrid1"&gt;
                  &lt;UpdatedControls&gt;
                      &lt;telerik:AjaxUpdatedControl ControlID="RadGrid1" /&gt;
                  &lt;/UpdatedControls&gt;
              &lt;/telerik:AjaxSetting&gt;
          &lt;/AjaxSettings&gt;
      &lt;/telerik:RadAjaxManager&gt;
  
      &lt;telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" /&gt;
  
      &lt;telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="WebBlue" style="position:relative;top:1px;" ValidationGroup="vgTabs"&gt;
          &lt;Tabs&gt;
              &lt;telerik:RadTab Text="Request Form Packets" Selected="true" ImageUrl="~/Admin/Images/Packet2.png" /&gt;
              &lt;telerik:RadTab Text="Request Forms" NavigateUrl="Forms.aspx" ImageUrl="~/Admin/Images/Forms.png" /&gt;
          &lt;/Tabs&gt;
      &lt;/telerik:RadTabStrip&gt;
  
      &lt;asp:ObjectDataSource ID="odsForms" runat="server" TypeName="MB.Form" SelectMethod="GetForms" /&gt;
  
      &lt;asp:Panel ID="pnlContent" runat="server" CssClass="ContentPanel"&gt;
  
          &lt;telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True" GridLines="None"
                  OnNeedDataSource="RadGrid1_NeedDataSource"
                  AllowAutomaticUpdates="true"
                  AllowAutomaticDeletes="true"
                  AllowAutomaticInserts="true"
                  OnInsertCommand="RadGrid1_InsertCommand"
                  OnUpdateCommand="RadGrid1_UpdateCommand"
                  OnDeleteCommand="RadGrid1_DeleteCommand"
                  OnRowDrop="RadGrid1_RowDrop"
                  OnDetailTableDataBind="RadGrid1_DetailTableDataBind" OnItemDataBound="RadGrid1_ItemDataBound"&gt;
  
              &lt;%-----------------------------------------------------------%&gt;
              &lt;%------------------------- PACKETS -------------------------%&gt;
              &lt;%-----------------------------------------------------------%&gt;
              &lt;MasterTableView AutoGenerateColumns="False" DataKeyNames="ID" ClientDataKeyNames="ID"
                      ShowHeadersWhenNoRecords="true" Name="gtvPackets"
                      NoMasterRecordsText="There are currently no Request Form Packets"
                      GroupLoadMode="Client"
                      RetrieveNullAsDBNull="true"
                      CommandItemDisplay="Top"
                      AllowAutomaticUpdates="true"
                      AllowAutomaticDeletes="true"
                      AllowAutomaticInserts="true"&gt;
  
                  &lt;RowIndicatorColumn&gt;
                      &lt;HeaderStyle Width="20px"&gt;&lt;/HeaderStyle&gt;
                  &lt;/RowIndicatorColumn&gt;
  
                  &lt;ExpandCollapseColumn&gt;
                      &lt;HeaderStyle Width="20px"&gt;&lt;/HeaderStyle&gt;
                  &lt;/ExpandCollapseColumn&gt;
  
                  &lt;CommandItemTemplate&gt;
                      &lt;table width="100%"&gt;
                          &lt;tr&gt;
                              &lt;td class="AdminGridHeader"&gt;&amp;nbsp;&lt;img src="../Admin/Images/Packet2.png" align="absmiddle" width="16" height="16" /&gt;&amp;nbsp;&amp;nbsp;Request Form Packets&lt;/td&gt;
                              &lt;td width="1%"&gt;&lt;asp:CheckBox ID="cbxAllowDragAndDrop" runat="server" AutoPostBack="true" OnCheckedChanged="cbxAllowDragAndDrop_CheckedChanged" /&gt;&lt;/td&gt;
                              &lt;td width="1%" nowrap="nowrap"&gt;&lt;asp:Label AssociatedControlID="cbxAllowDragAndDrop" ID="Label1" runat="server" Text="Enable Drag and Drop Reordering" ToolTip="Drag and Drop Reordering applies only to Forms." /&gt;&lt;/td&gt;
                              &lt;td align="right" width="1%"&gt;&lt;asp:Button ID="btnAddPacket" Text="Create New Packet" runat="server" CommandName="InitInsert" /&gt;&lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/table&gt;
                  &lt;/CommandItemTemplate&gt;
  
                  &lt;EditFormSettings&gt;
                      &lt;EditColumn ButtonType="PushButton" HeaderStyle-Font-Bold="true" UniqueName="EditCommandColumn" /&gt;
                  &lt;/EditFormSettings&gt;
  
                  &lt;EditItemStyle Font-Bold="true" BackColor="#FFFFCC"  /&gt;
  
                  &lt;Columns&gt;
  
                      &lt;telerik:GridTemplateColumn HeaderText="Packet Name" UniqueName="PacketName" SortExpression="Name"&gt;
                          &lt;ItemTemplate&gt;
                              &lt;img src="../Admin/Images/Packet2.png" align="absmiddle" width="16" height="16" /&gt;&amp;nbsp;&amp;nbsp;&lt;%#Eval("Name")%&gt;
                          &lt;/ItemTemplate&gt;
                          &lt;EditItemTemplate&gt;
                              &lt;telerik:RadTextBox runat="server" ID="rtbName" Width="300" Text='&lt;%# Bind("Name") %&gt;' /&gt;
                              &lt;asp:RequiredFieldValidator ID="rfvName" runat="server" ErrorMessage="Required" ControlToValidate="rtbName" /&gt;
                          &lt;/EditItemTemplate&gt;
                      &lt;/telerik:GridTemplateColumn&gt;
  
                      &lt;telerik:GridTemplateColumn HeaderText="Tags" UniqueName="Tags"&gt;
                          &lt;ItemTemplate&gt;
                              &lt;%#DisplayTagList(Eval("RequestFormPacketTags"))%&gt;
                          &lt;/ItemTemplate&gt;
                          &lt;EditItemTemplate&gt;
                              &lt;asp:Panel ID="pnlAddTags" runat="server" DefaultButton="btnAddTag"&gt;
                                  &lt;table cellpadding="0" cellspacing="0"&gt;
                                      &lt;tr&gt;
                                          &lt;td&gt;
                                              &lt;telerik:RadTextBox ID="rtbTags" runat="server" Width="200" style="text-transform:uppercase;" /&gt;
                                              &lt;asp:RegularExpressionValidator ID="revTags" runat="server" ErrorMessage="Invalid Entry" ControlToValidate="rtbTags" Display="Dynamic" ValidationExpression="^[^&lt;&gt;`~!/@\#}$%:;)(_^{&amp;*=|+]+$" ValidationGroup="vgTags" /&gt;
                                          &lt;/td&gt;
                                          &lt;td&gt;
                                              &lt;asp:Button ID="btnAddTag" runat="server" ValidationGroup="vgTags" Text="Add" OnClick="btnAddTag_Click" /&gt;
                                          &lt;/td&gt;
                                      &lt;/tr&gt;
                                  &lt;/table&gt;
                              &lt;/asp:Panel&gt;
                              &lt;div id="divTags"&gt;
                                  &lt;asp:PlaceHolder id="plhTags" runat="server" /&gt;
                                  &lt;asp:HiddenField ID="hdnTags" runat="server" /&gt;
                              &lt;/div&gt;
                          &lt;/EditItemTemplate&gt;
                      &lt;/telerik:GridTemplateColumn&gt;
  
                      &lt;telerik:GridTemplateColumn HeaderTooltip="Disable" ItemStyle-Width="1%" ItemStyle-HorizontalAlign="Center" SortExpression="IsActive" UniqueName="IsActive" ReadOnly="true"&gt;
                          &lt;ItemTemplate&gt;
                              &lt;asp:ImageButton ID="ibnDisabledProcess" runat="server" ImageUrl="../Images/Icons/Stop.png" Width="16"
                                  OnClientClick="return window.confirm('Activate this Process?');"
                                  ToolTip="Click to activate this Request for Account use." Visible='&lt;%#IIF(Eval("IsActive"),false,true) %&gt;' OnClick="ibnDisableToggleProcess_Click" /&gt;
                              &lt;asp:ImageButton ID="ibnEnabledProcess" runat="server" ImageUrl="../Images/Icons/Stop_disabled.png" Width="16"
                                  OnClientClick="return window.confirm('Deactivate this Process?');"
                                  ToolTip="Click to deactivate this Request for Account use." Visible='&lt;%#IIF(Eval("IsActive"),true,false) %&gt;' OnClick="ibnDisableToggleProcess_Click" /&gt;
                              &lt;asp:HiddenField ID="hdnDisableProcessID" runat="server" Value='&lt;%#Eval("ID") %&gt;' /&gt;
                          &lt;/ItemTemplate&gt;
                      &lt;/telerik:GridTemplateColumn&gt;
  
                      &lt;telerik:GridTemplateColumn HeaderText="Is Active" UniqueName="IsActiveCheckbox" Display="false"&gt;
                          &lt;EditItemTemplate&gt;
                              &lt;asp:CheckBox ID="cbxIsActive" runat="server" Checked='&lt;%# IIF(Eval("IsActive") Is DbNull.Value OrElse Eval("IsActive") = False,False,True) %&gt;' /&gt;
                          &lt;/EditItemTemplate&gt;
                      &lt;/telerik:GridTemplateColumn&gt;
  
                      &lt;telerik:GridEditCommandColumn ButtonType="ImageButton" EditText="Edit Admin" ItemStyle-Width="16" EditImageUrl="~/Images/edit-small.png" /&gt;
  
                      &lt;telerik:GridButtonColumn ConfirmText="Do you really want to delete this Admin? WARNING: THIS CANNOT BE UNDONE!!" ConfirmDialogType="RadWindow"
                          ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete Admin" ImageUrl="~/Images/Delete.png"
                          UniqueName="DeleteColumn"&gt;
                          &lt;ItemStyle HorizontalAlign="Center" Width="16" /&gt;
                      &lt;/telerik:GridButtonColumn&gt;
  
                  &lt;/Columns&gt;
  
                  &lt;DetailTables&gt;
  
                      &lt;%-----------------------------------------------------------%&gt;
                      &lt;%-------------------------- FORMS --------------------------%&gt;
                      &lt;%-----------------------------------------------------------%&gt;
                      &lt;telerik:GridTableView Name="gtvForms"
                              AllowPaging="true"
                              PagerStyle-Position="TopAndBottom"
                              PageSize="20"
                              AutoGenerateColumns="false"
                              DataKeyNames="RequestFormPacketID,ID"
                              runat="server"
                              CommandItemDisplay="Top"
                              Width="100%"&gt;
  
                          &lt;ParentTableRelation&gt;
                              &lt;telerik:GridRelationFields DetailKeyField="RequestFormPacketID" MasterKeyField="ID" /&gt;
                          &lt;/ParentTableRelation&gt;
  
                          &lt;CommandItemTemplate&gt;
                              &lt;table width="100%" class="AdminGridHeaders"&gt;
                                  &lt;tr&gt;
                                      &lt;td class="AdminGridHeaders"&gt;
                                          &amp;nbsp;&lt;img src="../Admin/Images/Forms.png" align="absmiddle" width="16" height="16" /&gt;&amp;nbsp;&amp;nbsp;Forms
                                      &lt;/td&gt;
                                      &lt;td align="right"&gt;
                                          &lt;asp:Button ID="ibnAdd" runat="server" Text="Add Form" CommandName="InitInsert" /&gt;
                                      &lt;/td&gt;
                                  &lt;/tr&gt;
                              &lt;/table&gt;
                          &lt;/CommandItemTemplate&gt;
  
                          &lt;EditFormSettings&gt;
                              &lt;EditColumn ButtonType="PushButton" InsertText="Save" UpdateText="Update" CancelText="Cancel" /&gt;
                          &lt;/EditFormSettings&gt;
  
                          &lt;EditItemStyle Font-Bold="true" BackColor="#FFFFCC"  /&gt;
  
                          &lt;Columns&gt;
  
                              &lt;telerik:GridTemplateColumn HeaderText="Form Name" UniqueName="FormName"&gt;
                                  &lt;ItemTemplate&gt;
                                      &lt;img src="../Admin/Images/Forms.png" align="absmiddle" width="16" height="16" style="margin-right:4px;" /&gt; &lt;%#Eval("Form.Name")%&gt;
                                  &lt;/ItemTemplate&gt;
                                  &lt;EditItemTemplate&gt;
                                      &lt;telerik:RadComboBox ID="rcbForms" runat="server" DataSourceID="odsForms" AppendDataBoundItems="true" DataTextField="Name" DataValueField="ID" SelectedValue='&lt;%#Bind("FormID")%&gt;'&gt;
                                          &lt;Items&gt;
                                              &lt;telerik:RadComboBoxItem Text="-- Select a Form --" Value="" /&gt;
                                          &lt;/Items&gt;
                                      &lt;/telerik:RadComboBox&gt;
                                      &lt;asp:RequiredFieldValidator ID="rfvForms" runat="server" ErrorMessage="Required" ControlToValidate="rcbForms" InitialValue="-- Select a Form --" Display="Dynamic" /&gt;
                                  &lt;/EditItemTemplate&gt;
                              &lt;/telerik:GridTemplateColumn&gt;
  
                              &lt;telerik:GridTemplateColumn HeaderText="Test" ReadOnly="true" UniqueName="TestForm" HeaderStyle-Width="1%" ItemStyle-HorizontalAlign="Center"&gt;
                                  &lt;ItemTemplate&gt;
                                      &lt;asp:HyperLink ID="hypTestForm" runat="server" NavigateUrl='&lt;%# "FormsPreview.aspx?fid=" &amp; Eval("FormID").ToString() &amp; "&amp;test=true" %&gt;' Target="_blank"&gt;&lt;asp:Image ID="imgTestProcess" runat="server" ImageUrl="~/Admin/Images/Test.png" ImageAlign="AbsMiddle" ToolTip="Test Form" /&gt;&lt;/asp:HyperLink&gt;
                                  &lt;/ItemTemplate&gt;
                              &lt;/telerik:GridTemplateColumn&gt;
  
                              &lt;telerik:GridTemplateColumn HeaderText="Header" SortExpression="Header" UniqueName="Header"&gt;
                                  &lt;ItemTemplate&gt;
                                      &lt;%#Eval("Form.Header")%&gt;&amp;nbsp;
                                  &lt;/ItemTemplate&gt;
                              &lt;/telerik:GridTemplateColumn&gt;
  
                              &lt;telerik:GridTemplateColumn ReadOnly="true" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="1%" HeaderStyle-Wrap="false" ItemStyle-Wrap="false"
                                  UniqueName="SortOrder"&gt;
                                  &lt;ItemTemplate&gt;
                                      &lt;asp:ImageButton ID="ibnItemUpArrow" runat="server" Width="16" height="16" ImageUrl="~/Admin/Images/ArrowUp.png" ImageAlign="AbsMiddle" Visible='&lt;%#IIF(Eval("SortOrder") = 0,false,true) %&gt;' CommandArgument='&lt;%#Eval("ID") %&gt;' OnCommand
  </code></pre>