J
Jason Tepe
Hello,
I have this problem. I have a Datagrid with a comdobox in it. I want
to be able to get at the SelectedIndexChanged event of the comdobox. I
have this code in the comdobox ItemCreated event.
Private Sub dgPrimaryContacts_ItemCreated(ByVal sender As Object,
ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles
dgPrimaryContacts.ItemCreated
If e.Item.ItemType = ListItemType.EditItem Then
Dim lst As ListBox = e.Item.FindControl("RoleList")
AddHandler lst.SelectedIndexChanged, AddressOf
ListSelect
End If
End Sub
This does fire but not Handler is added to comdobox. I also have the
Handler for the comdobox done.
Private Sub ListSelect(ByVal sender As Object, ByVal e As
System.EventArgs)
'Some code
End Sub
When I change an item in the combobox. This ListSelect sub is never
called.
Please help, what am I doing wrong?
Thanks,
Jason
I have this problem. I have a Datagrid with a comdobox in it. I want
to be able to get at the SelectedIndexChanged event of the comdobox. I
have this code in the comdobox ItemCreated event.
Private Sub dgPrimaryContacts_ItemCreated(ByVal sender As Object,
ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles
dgPrimaryContacts.ItemCreated
If e.Item.ItemType = ListItemType.EditItem Then
Dim lst As ListBox = e.Item.FindControl("RoleList")
AddHandler lst.SelectedIndexChanged, AddressOf
ListSelect
End If
End Sub
This does fire but not Handler is added to comdobox. I also have the
Handler for the comdobox done.
Private Sub ListSelect(ByVal sender As Object, ByVal e As
System.EventArgs)
'Some code
End Sub
When I change an item in the combobox. This ListSelect sub is never
called.
Please help, what am I doing wrong?
Thanks,
Jason