Nested repeater controls

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top