473,397 Members | 2,077 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,397 software developers and data experts.

Q: update dropdown list

Hello,
I have a dropdown list, updated through a dataset. After bind, I use this to
add extra item to my dropdown list. myDropDownList.Items.Add(“Item1”), I can
remove that by using myDropDownList.Items.Remove(“Item1”), If I try to remove
something coming from dataset, it seems I could not remove it. Is there any
way to do that, or is there any why to write a SQL string and update dropdown
list.
Thanks,
Jim.

Nov 19 '05 #1
2 1428
You must remove the item from the underlying dataset. Or delete the item
from the database and repopulate the dataset.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"JIM.H." <JI**@discussions.microsoft.com> wrote in message
news:BF**********************************@microsof t.com...
Hello,
I have a dropdown list, updated through a dataset. After bind, I use this
to
add extra item to my dropdown list. myDropDownList.Items.Add("Item1"), I
can
remove that by using myDropDownList.Items.Remove("Item1"), If I try to
remove
something coming from dataset, it seems I could not remove it. Is there
any
way to do that, or is there any why to write a SQL string and update
dropdown
list.
Thanks,
Jim.

Nov 19 '05 #2
I am trying to filter dropdown list based on user login id. so I can not
delete it form table, how should I delete it from dataset?

"Steve C. Orr [MVP, MCSD]" wrote:
You must remove the item from the underlying dataset. Or delete the item
from the database and repopulate the dataset.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"JIM.H." <JI**@discussions.microsoft.com> wrote in message
news:BF**********************************@microsof t.com...
Hello,
I have a dropdown list, updated through a dataset. After bind, I use this
to
add extra item to my dropdown list. myDropDownList.Items.Add("Item1"), I
can
remove that by using myDropDownList.Items.Remove("Item1"), If I try to
remove
something coming from dataset, it seems I could not remove it. Is there
any
way to do that, or is there any why to write a SQL string and update
dropdown
list.
Thanks,
Jim.


Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: jason | last post by:
Is there a way - possibly a disconnected rs? - to update the contents of an existing pulldown on a page without having to re-submit the page for the user to see the pulldown populated with an...
1
by: Joseph Barron | last post by:
Here is a SIMPLE problem that I'm trying to solve. It works in Netscape 6.2, but IE6 gives ""No such interface supported." Below are page1.htm and page2.htm . In page1.htm, there are two...
1
by: Ian Davies | last post by:
Hello In a php file I have a drop down list with index numbers in whos default value is feed into an sql query that filters records from my database and displays them in an html table. Trouble...
9
by: Pam Ammond | last post by:
I need the code to update the database when Save is clicked and a text field has changed. This should be very easy since I used Microsoft's wizards for the OleDBAdapter and OleDBConnection, and...
0
by: Nithin | last post by:
My code as an txt attachment. I have 2 drop down list boxes that on selection populate text boxes from my database table. I am able to display the correct values in these text boxes. I have 2...
1
by: aarif.shah | last post by:
Hi, i am Aarif, I Have a gridview.On clicking the edit link of gridview i want my edititem template(that i have defined ) to show either Texbox control or dropdown list depending on some...
16
by: Ian Davies | last post by:
Hello Needing help with a suitable solution. I have extracted records into a table under three columns 'category', 'comment' and share (the category column also holds the index no of the record...
1
by: Brad Isaacs | last post by:
Using ASP.NET 2.0 with SQL Server 2000 Inside my dropdown list box I am using an SQL DataSource to select the following data SELECT RTRIM(c.Name_First) + ' ' + RTRIM(c.Name_Last) AS Contact,...
16
by: ARC | last post by:
Hello all, So I'm knee deep in this import utility program, and am coming up with all sorts of "gotcha's!". 1st off. On a "Find Duplicates Query", does anyone have a good solution for...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.