Solved

How to convert a dropdown field to radio button control in SharePoint Designer 2007

Posted on 2012-04-02
4
3,224 Views
Last Modified: 2012-04-02
You would think this is simple, but I am having trouble changing a dropdown field on a SharePoint designer 2007 form to a radio control. The drop down field has 5 options.  In SharePoint Designer I click (highlight) the dropdown field and click the arrow on the right which brings up a menu.  The menu list common FormField Tasks. Where I have the option to select a data field and format as.  When I select my field with a radio button format my dropdown field is converted to a single radio button with no label. How do I get this radio button control to pick up my options? Or, what is the correct syntax to rewrite the control to include my options?

Original dropdown field:
<SharePoint:FormField runat="server" id="ff25{$Pos}" ControlMode="New"
FieldName="Project_x0020_Type"
__designer:bind="{ddwrt:DataBind('i',concat('ff25',$Pos),'Value','ValueChanged',
'ID',ddwrt:EscapeDelims(string(@ID)),'@Project_x0020_Type')}" />

New Option Button field:
<asp:RadioButton runat="server" id="ff25{$Pos}" text=" "
__designer:bind="{ddwrt:DataBind('i',concat('ff25',$Pos),'Checked','CheckedChang
ed','ID',ddwrt:EscapeDelims(string(@ID)),'@Project_x0020_Type')}" />

Any help is appreciated.
0
Comment
Question by:macarrillo1
  • 2
4 Comments
 
LVL 18

Expert Comment

by:ivan_vagunin
ID: 37797177
Hi!
RadioButton is not data bound control (it is single radio button as you see). You should use RadioButtonList control instead (http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.radiobuttonlist(v=vs.90).aspx)
0
 
LVL 5

Accepted Solution

by:
Robin Hall earned 500 total points
ID: 37797202
I have a follow up comment/question.  If this form is writing back to a SharePoint List, have you changed the option in the "Project Type" List column on the phsycial SharePoint site to display the choices using "Radio Buttons" instead of a "Drop-Down Menu"?

I use Sharepoint 2010 and when I tried changing it the way you mentioned in your question, I had the same issue that you did.  It turned into an asp control and only showed one radio button.  But when I instead changed the option in the actual SharePoint List column , my form picked up the new Radio Button Choice.  After refreshing my form, it displayed the radio buttons correctly while keeping it as a <SharePoint:Form Field> type.
0
 
LVL 9

Author Comment

by:macarrillo1
ID: 37797653
@rnh82, That was the problem!
I forgot, I rebuilt this list. Originally it was defined in SharePoint as radio button, but when I rebuilt the list, I left it as dropdown.

Thanks!
0
 
LVL 9

Author Closing Comment

by:macarrillo1
ID: 37797663
Sometimes you just need to get a fresh perspective.
Thank You!
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

785 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