Solved

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

Posted on 2012-04-02
4
3,291 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
[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
  • 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

Office 365 Advanced Training for Admins

Special Offer:  Buy 1 course, get 2nd free!  Buy the 'Managing Office 365 Identities & Requirements' course w/ Accelerated TestPrep, and automatically receive the 'Enabling Office 365 Services' course FREE!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Asp.Net Session Question 2 44
How to access a o365 sharepoint tem site from o365 mail? 5 44
Send parameters via datatable ajax call 4 38
aspx ascx, c# 7 37
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
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 …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

738 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