B
bill yeager
I have a radiobuttonlist inside a datalist. I also have a
datagrid inside the datalist. The data and the controls
are rendering just fine. However, I need to find these
controls inside the datalist in order to programatically
perform some logic.
I have the following in my HTML which is inside the
ItemTemplate of the datalist:
<asp:RadioButtonList id="Radiobuttonlist" runat="server"
OnSelectedIndexChanged="rblRadioButtonList_SelectedIndexCh
anged"
RepeatDirection="Horizontal" AutoPostBack="True">
<asp:ListItem Value="1">Waive All
Conditions</asp:ListItem>
<asp:ListItem Value="0">Don't Waive Any
Conditions</asp:ListItem>
</asp:RadioButtonList>
I have an event set up which comes into the following
code-behind handler with the debugger after I click one
of the radio buttons.
Protected WithEvents RadioButtonListHdr As RadioButtonList
..
..
..
Public Sub rblRadioButtonList_SelectedIndexChanged(ByVal
sender As Object, ByVal e As System.EventArgs) Handles
RadioButtonListHdr.SelectedIndexChanged
'Capture the postback event from the
radiobuttonlist
Dim rblConditions As RadioButtonList = DirectCast
(FindControl("Radiobuttonlist"), RadioButtonList)
Dim dgChild As DataGrid = DirectCast(FindControl
("DataGrid3"), DataGrid)
Dim chkCondition As CheckBox = DirectCast
(FindControl("Condition3"), CheckBox)
Dim lblLockNumber As Label = DirectCast
(FindControl("LockNumber3"), Label)
Dim lblConditionDetailID As Label = DirectCast
(FindControl("ConditionDetailID3"), Label)
Dim lblLoanID As Label = DirectCast(FindControl
("LoanID3"), Label)
How come I cannot find any of the controls??? I'm very
stumped with this if someone can PLEASE help........
datagrid inside the datalist. The data and the controls
are rendering just fine. However, I need to find these
controls inside the datalist in order to programatically
perform some logic.
I have the following in my HTML which is inside the
ItemTemplate of the datalist:
<asp:RadioButtonList id="Radiobuttonlist" runat="server"
OnSelectedIndexChanged="rblRadioButtonList_SelectedIndexCh
anged"
RepeatDirection="Horizontal" AutoPostBack="True">
<asp:ListItem Value="1">Waive All
Conditions</asp:ListItem>
<asp:ListItem Value="0">Don't Waive Any
Conditions</asp:ListItem>
</asp:RadioButtonList>
I have an event set up which comes into the following
code-behind handler with the debugger after I click one
of the radio buttons.
Protected WithEvents RadioButtonListHdr As RadioButtonList
..
..
..
Public Sub rblRadioButtonList_SelectedIndexChanged(ByVal
sender As Object, ByVal e As System.EventArgs) Handles
RadioButtonListHdr.SelectedIndexChanged
'Capture the postback event from the
radiobuttonlist
Dim rblConditions As RadioButtonList = DirectCast
(FindControl("Radiobuttonlist"), RadioButtonList)
Dim dgChild As DataGrid = DirectCast(FindControl
("DataGrid3"), DataGrid)
Dim chkCondition As CheckBox = DirectCast
(FindControl("Condition3"), CheckBox)
Dim lblLockNumber As Label = DirectCast
(FindControl("LockNumber3"), Label)
Dim lblConditionDetailID As Label = DirectCast
(FindControl("ConditionDetailID3"), Label)
Dim lblLoanID As Label = DirectCast(FindControl
("LoanID3"), Label)
How come I cannot find any of the controls??? I'm very
stumped with this if someone can PLEASE help........