473,378 Members | 1,146 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

binding a dropdown list C# .NET

I am using a databound dropdown list bound to a sql datasource in C# .NET environment. When the user opts to delete an entry from the dropdown list, the dropdown list does not reflect the change, even on postback.
i.e. ddlColors = red, yellow, blue, green; user selects to delete red; ddlColors = red, yellow, blue, green. Red is still displayed.
I am able to clear the dropdown list with ddlColors.ClearSelection(); But I don't know how to repopulate the dropdown list to display the updated datasource.
Oct 23 '08 #1
2 3110
nateraaaa
663 Expert 512MB
After you remove the item from the drop down list are you calling dropdownlist.DataBind()?

Nathan
Oct 24 '08 #2
NM, i just manually added the new element. thks tho.
Oct 30 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Maziar Aflatoun | last post by:
Hi, I have a DataRow that I want to bind to a dropdown list. I have 2 columns (TypeName, TypeValue). When do ddlNewAttribute.DataSource = drAttrValues; ddlNewAttribute.DataBind(); How do...
0
by: blenderdude | last post by:
I would like to bind a list of items to a drop down control and then bind the selectedvalue to a row from a different table. Is it possible to do this with just databinding? I can populate the drop...
2
by: DotNetJunkies User | last post by:
hi,, im trying to work out what code is needed for the below problem about databinding a dropdown list and having actual datalist items as value "0" ie 'please select' can anyone tell me how to...
5
by: david | last post by:
I have a question in the following. Any one could give me a help? Thanks David The dataset is declared and created at Class level. My source code is here: Private Sub...
9
by: Timm | last post by:
I have an ASP.NET 2.0 page with two DropDownLists. I am using declarative data binding wherever possible and trying to minimize the use of code. The list of values in DropDownList DDL2 should be...
0
by: JSantora | last post by:
Essentially, InsertAT is broken! For the past couple of hours, I've been getting this "Parameter name: '-2147483550' is not a valid value for 'index'." error. Apparently, its caused by having...
0
by: muthu | last post by:
Hi guys, Iam using a repeator control in my page.In wich i have dropdown list as the last column.I have a label in the first column.Now i have binded a datable to the repeator in the page load...
3
by: Eric Layman | last post by:
HI, I have a select menu <select id="country" runat="server" class="myformat "> <option value="AFGHANISTAN">AFGHANISTAN</option> <option value="ALBANIA">ALBANIA</option>
2
by: pavanip | last post by:
Hi, I have a problem with binding data to dropdownlist from database in alphabetical order. My database contains some fields like All,Air,Airline,Books,Cars etc. There are 2 dropdown...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.