A
Alex - IntraLAN
Hi all,
sorry if I have cross posted, I have a question about registering the
events of a RadioButtonList that is nested 2 levels deep in Repeater
controls, all the events work for the first group and its sub items,
but the events are not being reigstered for any other groups and its
sub items.
Protected Sub Repeater1_ItemCreated(ByVal sender As Object, ByVal e
As System.Web.UI.WebControls.RepeaterItemEventArgs)
Dim itm As RepeaterItem = CType(sender,
Control).NamingContainer
Dim ri As RepeaterItem = e.Item
Dim myCheck As New RadioButtonList
If itm.ItemType = ListItemType.AlternatingItem Or itm.ItemType
= ListItemType.Item Then
Dim i As Integer
For i = 0 To Me.parentRepeater.Items.Count - 1
Dim innerRepeater As Repeater = New Repeater
innerRepeater =
CType(Me.parentRepeater.Items(i).FindControl("Repeater1"), Repeater)
Dim j As Integer
For j = 0 To innerRepeater.Items.Count - 1
myCheck =
CType(innerRepeater.Items(j).FindControl("rbResult"), RadioButtonList)
AddHandler myCheck.SelectedIndexChanged, AddressOf
my_SelectedIndexChanged
Next
Next
End If
End Sub
innerRepeater =
CType(Me.parentRepeater.Items(i).FindControl("Repeater1"), Repeater)
line, but I cannot be sure, any help would be great.
Regards
Alex
sorry if I have cross posted, I have a question about registering the
events of a RadioButtonList that is nested 2 levels deep in Repeater
controls, all the events work for the first group and its sub items,
but the events are not being reigstered for any other groups and its
sub items.
Protected Sub Repeater1_ItemCreated(ByVal sender As Object, ByVal e
As System.Web.UI.WebControls.RepeaterItemEventArgs)
Dim itm As RepeaterItem = CType(sender,
Control).NamingContainer
Dim ri As RepeaterItem = e.Item
Dim myCheck As New RadioButtonList
If itm.ItemType = ListItemType.AlternatingItem Or itm.ItemType
= ListItemType.Item Then
Dim i As Integer
For i = 0 To Me.parentRepeater.Items.Count - 1
Dim innerRepeater As Repeater = New Repeater
innerRepeater =
CType(Me.parentRepeater.Items(i).FindControl("Repeater1"), Repeater)
Dim j As Integer
For j = 0 To innerRepeater.Items.Count - 1
myCheck =
CType(innerRepeater.Items(j).FindControl("rbResult"), RadioButtonList)
AddHandler myCheck.SelectedIndexChanged, AddressOf
my_SelectedIndexChanged
Next
Next
End If
End Sub
innerRepeater =
CType(Me.parentRepeater.Items(i).FindControl("Repeater1"), Repeater)
line, but I cannot be sure, any help would be great.
Regards
Alex