?
Solved

Accessing the value of a RadioButtonList that is in a template field

Posted on 2014-10-07
1
Medium Priority
?
140 Views
Last Modified: 2014-11-25
I have an app that allows our staff to submit client referrals. I'm currently working on a management page that allows the resposible staff member to manage the referrals and send them to the correct staff member / department. The page is written in VB and has a sql back end.

I have a detailsview with a number of template fields. The one I am interested in is the Assigned To RadioButtonList. I have configured it so that its text is the staff member's name and its value is thier email address.

In the next row I have a dropdown list that is supposed to display the email address of the selected staff member based on the selected value of the Assigned To Radiobuttonlist.selectedvalue.

I normally just use the datasource wizard and base a where clause on a control, but when I try this when the control is in a template field it is not listed in the available controls.

Does anyone know how to have my control added to the list or know of another way of doing this?
Assigned To RBL not listed
I've also tried the following code with no success:

If ReferralsManagementDV.CurrentMode = DetailsViewMode.Edit Then
            Dim ReferralAssignedToRBL As RadioButtonList = DirectCast(ReferralsManagementDV.FindControl("ReferralAssignedToRBL"), RadioButtonList)
            Dim ReferralAssignedToEmail As TextBox = DirectCast(ReferralsManagementDV.FindControl("ReferralAssignedToEmailTB"), TextBox)
            If (ReferralAssignedToRBL.SelectedValue) IsNot Nothing Then
                ReferralAssignedToEmail.Text = ReferralAssignedToRBL.SelectedValue.ToString
            End If

            SendStatusUpdateButton.Visible = False
            CloseTicketButton.Visible = False

        End If

Open in new window


I receive the "'ReferralAssignedToRBL' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value error when I click the edit button.
0
Comment
Question by:ICantSee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 29

Accepted Solution

by:
sammySeltzer earned 1500 total points
ID: 40368814
It looks like the columnName you are trying to use is empty.

Try and see if this helps you resolve it:

http://forums.asp.net/t/1243633.aspx?+RadioButtonList1+has+a+SelectedValue+which+is+invalid+because+it+does+not+exist+in+the+list+of+items+
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Thoughout my experience working on eCommerce web applications I have seen applications succumbing to increased user demand and throughput. With increased loads the response times started to spike, which leads to user frustration and lost sales. I ha…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question