click event not triggered

  • Thread starter Thread starter samuelberthelot
  • Start date Start date
S

samuelberthelot

Hi,
I have a linkbutton in a template column of my datagrid.
I've done the following to add event to each of the button in the grid:

For Each dgi As DataGridItem In GridView2.Items
AddHandler CType(dgi.FindControl("QueryGroupName"),
LinkButton).Click, AddressOf somefunction
Next

Public Sub somefunction(ByVal sender As Object, ByVal e As
System.EventArgs)
stop
End Sub

Note : The page is the child page of a Master page.
The event is never triggered. Why ?
 
I've noticed that when I look at the source in my browser, the control
was renamed to:

ctl00_ReportWizard_GridView2_ctl03_QueryGroupName !!
This is so weird.
 
Back
Top