joemahogany
New Member
I have a gridview that uses a custom template field, like this:\[code\]Public Class CheckBoxTemplate Implements ITemplate Public Event checkChange As EventHandler Public Sub cb_OnChange(ByVal sender As Object, ByVal e As EventArgs) RaiseEvent checkChange(Me, New EventArgs) End Sub Public Sub InstantiateIn(ByVal container As System.Web.UI.Control) Implements System.Web.UI.ITemplate.InstantiateIn Dim cb As CheckBox = New CheckBox() cb.ID = "selectedUserCheckbox" cb.AutoPostBack = True container.Controls.Add(cb) AddHandler cb.CheckedChanged, New EventHandler(AddressOf cb_OnChange) End SubEnd ClassDim SelectUserTF As New TemplateFieldWith SelectUserTF.HeaderText = "Select User".ItemStyle.Wrap = False.ItemTemplate = New CheckBoxTemplate()End With\[/code\]My question is, how do I capture the event that fires from the CheckBoxTemplate in the app that is using it? Through debug, I can see that the event fires in the CheckBoxTemplate but I cant seem to catch it on the main application that implements it.