Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2012-04-02
4
Medium Priority
?
3,407 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 2000 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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
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 …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

705 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