I have a combo box that is populated from an arraylist at page load...
===============================================================================
Page load event code to load combo box:
nopCommTopic.Items.Clear()
RCBI =
New RadComboBoxItem()
RCBI.Text =
"Select a topic..." & ",0"
RCBI.Value = 0
RCBI.Selected =
True
nopCommTopic.Items.Add(RCBI)
For Each Nop_Topic_Data In Nop_Topic_Arry
RCBI =
New RadComboBoxItem()
RCBI.Text = Nop_Topic_Data.Name &
", " & Nop_Topic_Data.TopicID.ToString
RCBI.Value = Nop_Topic_Data.TopicID
nopCommTopic.Items.Add(RCBI)
Next
===============================================================================
The page contains a button for execution after the user selects an item from the above combo box. After the button is clicked, the code retrieves the selected value from the combo box and then continues processing. The problem is that the selected value test (see code immediately below) always gets a 0 for the selectedvalue no matter which item in the combo box is selected. It also does not matter how many different entries in the combo box that you select before pressing the processing button.
The .aspx page code for the combo is shown further below. It's pretty simple.
===============================================================================
button click event code:
' Verify that the user did select a topic to translate and save it if they did
Dim iTopic As Integer = 0
If Me.nopCommTopic.SelectedValue = 0 Then
Me.PageErrors.Text = "You must select a topic to translate from the list!"
Exit Sub
End If
iTopic = nopCommTopic.SelectedValue
===============================================================================
===============================================================================
related code from .aspx page:
<
telerik:RadComboBox ID="nopCommTopic" Skin="NeoClassic" EnableEmbeddedSkins="false" runat="server"></telerik:RadComboBox>
<br />
<br />
<asp:Button ID="TranslateTopic" runat="server" Text="Translate Selected Topic" />
===============================================================================
Can you help me figure out what is wrong?
Thanks in advance! I feel so stupid, but I cannot figure this out. I must be missing something really basic!
Lynn