.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

Need help with Dropdown list populated using a data source

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :SharePoint

I have a dropdownlist that I am trying to populated from a data source using an Oracle db. I can't get any data with the code I have. Can this be down in Sharepoint? Here is the code I am using:


<asp:DropDownList runat="server" id="DropDownList2" AutoPostBack="true"  DataValueField="POPULATION_LIST_ID" DataSourceID="sdsLastName" DataTextField="Last_Name" Visible="True" Height 

View Complete Post

More Related Resource Links

Set a data source for DropDown List inside GridView


How do i set a data source of  a drop down list which is inside a grid view, snap shot of asp code given below , the Asp file name is DataEntry.aspx and there is method in the DataEntry.aspx.cs called DTB.BindData("Department"). i want to set the datasource to point to this method


<asp:GridView ID="GridViewEmply"  DataKeyNames="EmployeeID" runat="server"
 AutoGenerateEditButton="True" ShowFooter="True"
OnRowEditing =  "GridViewEmply_RowEdit" OnRowCancelingEdit = "GridViewEmply_RowCancelingEdit"
OnRowUpdating = "GridViewEmply_RowUpdating"  OnRowCommand = "GridViewEmply_RowCommand"
AllowSorting="True" AutoGenerateColumns="False" AllowPaging="True"  Visible="false">
<asp:TemplateField HeaderText="DepartmentName">
<asp:Label ID="LabelEmplyDeptName" Text='<%# Eval("DepartmentName") %>' runat="server"></asp:Label>
<asp:DropDownList ID="ddlDept" runat="server" >

Only first row of a repeating table is being populated from a sharepoint list secondary data source


I have a reapeating table in maind atat source and I am trying to  populate it from values in a secondary data source, but when I am trying to do that it is only populating first row, leaving all other rows blank.


How to get this working..

Connecting a Sharepoint Custom list with an external Data-source

Hi I am planning to connect a Sharepoint Custom list with an external Data-source. External DB will be in Access 2007 format. More Information: I need a solution that we can connect our sharepoint list (one-way) to online db in a way that new  information is directly updated in the sharepoint list, whilst other info changed in sharepoint list  is not synced back to original value. Is there a way to solve this? -saumil

Sharepoint list as Report Data Source

My current environment is Sharepoint 2007 with SSRS 2008 in Sharepoint Integrated Mode. SSRS 2008 uses trusted authentication to communicate to Sharepoint 2007. Sharepoint 2007 is configured to use NTLM authentication (configured with a domain account). My settings within Central Admin are Authentication Type: Windows IIS authentication settings: Integrated windows authentication with NTLM. My question is: Do I need to configure Sharepoint to use kerberos to use Sharepoint Lists as a Report Data Source?  

Create dynamic dropdown list when we export data to excel using SSRS.


Hi All,

I have assigned a work to create a report, that should render in excel with dropdown list. i.e. report should contain a input parameter as a table names, when user selects the table name, report should show only the field names of the selected table. Some of the field name have look up values that values should be displayed as dropdown when we export to excel.

Can any one have any idea how to proceed with this report?



how to bind object data source with bullited list


 i wanted to retrieve things from the data base and perform mathmatical operations on it then post it to the user, so i was told to use the bullited list and bind it to the object dataSource

how to perform such thing??

Data View Web Part, update to Data Source / adding new list to existing data source


Hi all,

I have four Lists with identical columns :

List 1
List 2
List 3
List 4

I had to merge them, hence i created a data source ( Linked Source ) and merged these lists in SPD. I have used a data view webpart to display some columns from the merged lists data source and everything was working fine.

But now i have a new List : List 5 which also has the same columns like the other four lists and i need to update the data soure such that it is merged list of 5 lists not 4.

i updated the datasource property of the linked source to merge this new list as well. However the contents of List 5 dont appear in the data view webpart. 

Am i missing something here ? 

I dont want recreate the data view web part from scratch eachtime , because in future there might be List 6 , List 7 as well ... 

SharePoint List Data Source with Express Edition


Hello All,

I am working on SQL Server Express Edition with Advance Services 2008 R2. I am using Report Builder 3.0 to build report.

In Report Builder, there is data source type called Microsoft SharePoint List .

Can anybody please confirm whether this option will work with SSRS in Express Edition? I did not get information from above link.



Copy and modify Data Source crashes SPD 2010 - List Threshold error


When I try to copy and modify a data source, I get a server error that the operation is prohibited because it exceeds the list view threshold, but I only have 10 items in my list, well below the default threshold.  I get the same error if I try to create a new page from master.  Anybody run across this one?

Confirmed the threshold with my administrator and even upped it to 10,000 but that did not help.

Data Form Web Part - Sharepoint Dropdown List as a field in Edit View - Possible?


Hi guys,

I'm building a Sharepoint page with a data form web part that uses custom SELECT and UPDATE statements with an SQL Server connection in order to retrieve and store records of information.

I'm getting along fine, records seem to update how they should etc, but I've ran into a problem with one thing: Sharepoint dropdownlists in 'Edit Template'

So the issue is this: if I replace a textbox field with a dropdown list that is populated with a separate SQL datasource, the dropdown list seems to be unable to show the current value of the field.

E.g. I have a dataview which has a field "FruitID", which I can update just fine by setting the ID value to different numbers. The SQL datasource uses the FruitID to display a list of all available Fruits, (e.g. 1 = Banana, 2 = Apple, 3 = Cherry, etc).

If i open the dataview in editmode, the default value in the dropdown is null, despite the real value of the field being "2", which should show "Apple" in the dropdown.

I can select a fruit and click save, and it will update just fine. But the initial display needs to show the correct value to start with.

Is there a custom binding I should be coding to make this work? I can't configure dropdown <items> on an individual level as they are populated from the SQL server. I can't set "SelectedI

Infopath dropdown list populated by files stored in svn


Hi, I'm familiar with populating a DDL in my InfoPath (using 2010) form from a List in sharepoint however I would also like to be able to do this against an existing svn repositry but do not know if this is possible?

The situation I have is that that a number of assets exist in a svn repo, I need to have the form auto-update & populate the DDL with the filenames there. Any ideas on how to do this would be much appreciated!

please help create report using sharpeoint list as data source


the dilema is I can use standalone report builder 3.0 to create report from sharepoint list data source. But I cannot upload any report(not just sharepoint source) from report builder 3.0(standalone) to report server

I can create report model in sql BIDS for report server and using builting report builder 1.0 to create a report, but the data provider in BIDS only shows SQLclient and Oracleclient

any idea?

how to get dropdown list data VALUE FIELD property in JavaScript



im getting  'ON' as value instead of its actual value

InfoPath Data Source Issue with SP List


I have a problem with a drop down list in my InfoPath form that gets it's values from a list in SharePoint.  The error is:

The query cannot be run for the following DataObject: MasterList
InfoPath cannot run the specified query.
The SOAP message cannot be parsed.

I read several posts on the subject but none are exactly like this.  The last sentence indicates to me the XML is mal formed and can't be parsed.  Does anyone know the answer to this?

Dropdown list in ASP.NET - How to get value selected

am sure this must be very simple, but unforunately I can't figure it out.
I have the following code which populates the dropdown lists from the database. This works fine. Now, when the user selects a particular employee name from the list, I want to get the Employee Id of the selected employee. i.e. I need to get the "Eid" value. I can do this if the EId is loaded in the dropdown list, but in this case only the employee name is displayed. Please let me know howI can get the Eid value even though it is not loaded in the dropdown list.
I would really appreciate your help

Editable Gridview with Textbox, CheckBox, Radio Button and DropDown List

This is an example of an editable gridview containing different ASP.NET controls. When user wants to edit values in gridview, she/he can use these controls to edit existing values in Gridview Edit Mode.

Using the Code

Binding an array to dropdown list


I have the following string which is a list of urls. How do I get this to work so the url shows for the selection and also is the value?      


allLinks = newAllLinks
        Me.DropDownList1.DataTextField = "Link"
        Me.DropDownList1.DataValueField = "LinkURL"
        Me.DropDownList1.Items.Insert(0, New ListItem(" - Select - ", 0))
        Me.DropDownList1.DataSource = allLinks


 ArgumentNullException: Value cannot be null.
Parameter name: container]
   System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName) +121
   System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName, String format) +8

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