S
samuelberthelot
Hi,
I've got a datagrid with template column that contains a dropdownlist.
To add a event handler to each dropdown's in the grid I do that:
For Each dgi As DataGridItem In GridView2.Items
AddHandler CType(dgi.FindControl("GroupQueries"),
DropDownList).SelectedIndexChanged, AddressOf somefunction
Next
The control GroupQueries is found because I use the same technique to
bind the dropdown to a datasource. However when I run the app,
somefuntion is not called
here's the code of somefunction, although I doubt the problem comes
from here since it's not event called:
Public Sub somefunction(ByVal sender As Object, ByVal e As
System.EventArgs)
MsgBox("test")
End Sub
Can you help?
thanx
I've got a datagrid with template column that contains a dropdownlist.
To add a event handler to each dropdown's in the grid I do that:
For Each dgi As DataGridItem In GridView2.Items
AddHandler CType(dgi.FindControl("GroupQueries"),
DropDownList).SelectedIndexChanged, AddressOf somefunction
Next
The control GroupQueries is found because I use the same technique to
bind the dropdown to a datasource. However when I run the app,
somefuntion is not called
here's the code of somefunction, although I doubt the problem comes
from here since it's not event called:
Public Sub somefunction(ByVal sender As Object, ByVal e As
System.EventArgs)
MsgBox("test")
End Sub
Can you help?
thanx