.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Drop-Down List Filled with Checkboxed 'Choice' Field?

Posted By:      Posted Date: October 08, 2010    Points: 0   Category :SharePoint

SP Lists allow a 'choice' field.  You can opt to make the Choices a manually typed in list where the user simply 'checks' off one or more options.

Within InfoPath, I want to be able to show ALL of the checked-off choices in a drop-down menu.  Can't do it! :(

Any suggestions?


View Complete Post

More Related Resource Links

FormView Text Field Being Set by A Drop Down List


Hello, I have a FormView which is used to insert a record into a database.  Outside of this formview i have a drop down list, I want to grab the value from that drop down list and set one of the text fields within the formview to it's currently selected value.  I've tried the following code, but the dynamic categorytextbox line is what seems to not be working.

                    <asp:DropDownList ID="ddlCategory" runat="server" AutoPostBack="True" 
DataSourceID="SqlDataSourceCategory" DataTextField="CategoryName"
DataValueField="CategoryID" Width="200px">

                            <asp:TextBox ID="CategoryIDTextBox" runat="server" 
Text='<%# Bind("CategoryID") %>' Visible="False" />

        protected void FormView1_DataBound(object sender, EventArgs e)
dynamic varCategory = ddlCategory.SelectedValue;
dynamic categoryTextBox = FormView1.FindControl("CategoryIDText

How can I Set default value for drop down list filled with Cascading

Hi AllI've this problem, how can I set the default value for drop down list filled with cascading. I can't catch the event that came after cascading to set the default value and I can't call any control in this function:  "AjaxControlToolkit.CascadingDropDownNameValue[]"   I've passed the Drop down list as a session and the default value in session   When I call the session of "Drop Down List" the session value Is NULL in this function:  "AjaxControlToolkit.CascadingDropDownNameValue[]"   Any help please. 

Field type Choice is not installed properly. Go to the list settings page to delete this field.

Has anyone received this error message and know how to deal with it? Field type  Choice  is not installed properly. Go to the list settings page to delete this field. I have received this error three times now, once when trying to add a 'List Definition From Content Type' in Visual Studio twice when trying to add from existing site columns in Sharepoint in the list settings and library settings from the ribbon from a list and a document library.

Display each new line of a sharepoint mutliline text field as choice in drop down box.

The question pretty much says it all. I have a lot of data I need to represent, and this would be the best way to do it. I have a multiline text field in sharepoint, where each line has a choice that should be a seperate choice in a text box. How do I do this? I have the data connection set up, and I would be fine with adding some sort of tag after each line, if that would make it so infopath can somehow parse out those tags, and interpret each "chunk" as a choice. Thanks in advance for your help.

User Specific Values for a Drop Down "Choice" Field

I would like to create a drop down field which has some fields disabled or not visible based on the user logged in.  Is this possible?

Rules on Drop Down List to populate another text field


I have a last name field in infopath 2007 web form with a drop down on sharepoint list. When they select a certain last name, I want it to populate the primary dept field on form. I set up a rule on the last name to set the primary dept field = to the primary dept field on datasource when the last name field is not blank. What I am getting is the primary dept value for the first record in the datasource. I am trying to understand what record I have. Do I need to do another query back to the datasource with the last name field to have the correct entries available to populate the dept field with? Please give me some clue. I am a programmer but not grasping the interplay between the datasource and the form and noit finding what I need in numerous google searches.



Required Field Validator and drop down list


 I am trying to get the required field validator to work. I have given it an initial value of the first index value in the dropdown list. I is just not working. Will my contrrols residing on a View of a Multiview control effect anything. I am using all drop down lists?

C#: How to Add Item to SharePoint list using web services? One of the field is a choice field.


I have a code that looks something like this:



batch.SetAttribute("OnError", "Continue");
batch.SetAttribute("ListVersion", "1");
batch.SetAttribute("ViewName", "{GUID of my View}");

batch.InnerXml = "<Method ID='1' Cmd='New'>" +
"<Field Name='Title'>Something</Field>" +
"<Field Name='Status'>Something Else</Field> </Method>";

myList.UpdateListItems("{GUID of my List}", batch);


the field name "Status" is a choice field. When i execute this code, my program doesn't add anything to my sharePoint List. However when I remove the 

"<Field Name='Status'>Something Else</Field>

which means i'm left with this code:


How to localize choice field values in list?


Hi ,

Does anyone know how to localize values of choise field in list?

I try something like this in my list definition but it does not work:

<Field Type="Choice" ...>

thanks in advance

Way of adding items in Drop Down List or List Box using Javascript

The article Way of adding items in Drop Down List or List Box using Javascript was added by raja.s on Sunday, June 06, 2010.

Hi,script type="text/javascript"> function AddItem(Text,Value) { // Create an Option object var opt = document.createElement("option"); // Add an Option object to Drop Down/List Box document.getElementById("DropDownList"

How to use a drop down list to edit in the standard Edit.aspx with DD?


Hey All,

I'm brand new to Dynamic Data and to ASP.NET.  I've been able to fumble around and get the calendar extender up and running and a few other customization options implemented, but I can't seem to get this drop down list to work - even after reading tons of online info.  The good news is that my web page/application is VERY simple, so hopefully you guys can help me out.  I'm working in VB btw.

I have a list of road projects submitted to me by local governments.  One of the fields is SponsoringAgency, which has a limited number of possible entries (the names of member governments).  Thus, when they submit a new project, or edit an existing one, I want to limit the input into the field "SponsoringAgency." I'm trying to use a dropdownlist because I'm familiar with it from Access, but it may not be the best approach.  Imagine you just setup a brand new, standard DD website, how would you get this to work?

Methods tried and failed (probably because I don't understand them fully):

UIHint - The closest I can get with this is an error saying that since SponsoringAgency isn't a Foreign Key, I'm out of luck.

Creating a SponsoringAgency Table - In my data layer, I created a second table with a list of government names.  I then tried se

Workflow field not being added to list or views when adding a workflow


This problem just started happening in my entire site collection.  Anytime I associate a workflow to any list or doc lib the Workflow column that shows the status and links to the history is not beind added to the list or any views and is nowhere to be found.   Here's exactly what I'm doing:

1.  Go the List settings -> workflow settings -> add a workflow (for this example the OOB approval workflow)

2.  After adding I go to the List, the workflow column doesn't exist.

3.  I go to "modify view", and the workflow column is not listed in the available columns.

Any help is greatly appreciated.

How to pupolate one Drop Down list values dynamically depending on the value of another Drop down fr


i have two dropdowns in my Custom form.

One drop down displays all the list titles present in the current site.

i want to update another drop down with the list of columns(Field Names not the items).

i am able to get list named in one drop down but i am not able to figure out how to dynamically populate the another drop down with list of columns

any ideas

Cascade Drop Down List Problem


I have 4 "cascade drop down linked" each other. The first one is "AccesoryFor", the second "TypeOfAccesory", the third "MarkOfAccesory" and the fourth "ModelOfAccesory".

The problem is that sometimes is possible in the web page I'm programming that a "Session Variable" could have a value that must be selected in one of that ddls. But not only that, the "ddl" or the entire "row" where the ddl is located ,must disappear. The problem is that, when the page does the rendering process, the others "cascade drop down" don't find its "control parents", so they stay disable and without data.

So, what I do in the Load Method:

 protected void Page_Load(object sender, EventArgs e)
        if (!IsPostBack)
            Session["AccesoryFor"] = "cellphone";

 public void loadValuesToUI()
    if (Session["consultarRecursos_AccesorioDe"] != null)
            rowAccesoryFor.Visible = false;

As the row where the first DLL is located dissapears, and error occurs saying that "Control-Parents" are not found. There's no way to "Disable" or make dissapear the ddl in the web-service because

Video: Field and List Item Validation in SharePoint 2010

SharePoint supports the ability to create Excel-like field validation formulas to validate field data in a list, which greatly reduces the amount of custom code that a developer must create and deploy. (Length: 1:44)

How to Set a list item's createdby or modifiedby field as a User(deleted from AD)



I have to migrate data from SQL DB to SP list. But its old data and some users who created/modified the record has been deleted from the AD. Now I need to set the CreatedBy / ModifiedBy Field of the item accordingly. How to achieve this?

And when I tried to modify the "Editor" and "Author" field through Object Model, it works. But its not working through Webservice. What is the reason behind this?

Please help me find an optimal solution for this...


Thanks and Regards,

/* John JB */

How to read a column of a sharepoint list to a text string field of infopath form?

My infopath form used to read these email addresses from a web service and web.config file. Now i would like to get these user email addresses from a contact list in a sharepoint server. I am trying to do this without writing any codes. Here is what i have done so far: 1. Adding a new "data connection to receive data from SharePoint library or List" where i selected Email Address column of the contact list. 2. I added a new Text Field and define a new rule with "Query using a data connection" defined above. When i try to access the newly created Text field above it always return empty as if the Query attached to it did not executed at all. What did i do wrong? Is there a better way? Thank you in advance for your help.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend