Can conditional logic be put on a data bound radio button list in ASP C#?
Posted on 2010-01-06
I have a radio button list that I am trying to accomplish two tasks with.
First, if another field in that data row is equal to "-", I want this row to appear in the radio button list without an actual button as a non-selectable item. Second, I want each row to be indented based another value in the table.
The code for my radio button is:
<asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource5"
DataTextField="Application" DataValueField="InventoryNbr" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged" AppendDataBoundItems="True" RepeatLayout="Flow">
and the code behind is
protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
Is this even possible? I've been able to get it to work in ColdFusion, but cannot get it in ASP C#.
Thank you in advance.