473,657 Members | 2,392 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(“It em1”), 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 1438
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**@discussio ns.microsoft.co m> wrote in message
news:BF******** *************** ***********@mic rosoft.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("Item 1"), I
can
remove that by using myDropDownList. Items.Remove("I tem1"), 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**@discussio ns.microsoft.co m> wrote in message
news:BF******** *************** ***********@mic rosoft.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("Item 1"), I
can
remove that by using myDropDownList. Items.Remove("I tem1"), 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
2310
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 additional value? I realise there are javascript possibilities (and I am still searching for a usable one) but I thought perhaps it may be possible to allow a user to add a new entry to a drop down box that had been dynamically populated from an...
1
8281
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 dropdown lists. If you change the selection of the left one (e.g. choose parentoption2), it should open up page2.htm in a popup window.
1
10173
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 is this happens as soon as the php is run so bringing up the same records filtered from the default index. Also when I select a new index no from the drop down list is doesnt refilter the records bringing up the ones for the new list. It still...
9
4750
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 DataSet; and all I'm doing is showing one record in text fields, allowing the user to modify the text fields, and then updating the database again when the user clicks the Save button. The fields already show the correct data record since I have...
0
2425
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 questions: 1) I would like the user update these text fields that get populated with data from the database. For some reason I get the error when I change the textbox value.
1
1280
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 condition. when user clicks on update link of the gridview,the value shoud be taken from either textbox or selected value of dropdown list depending upon which control is appearing in the edit mode. How can i do this?
16
3485
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 in a hidden field) I wish the user to be able to edit the data in the table, so I have extracted the records into hiddenfield, textareas, dropdown list and checkbox so that they can make changes. I named these elements as arrays and wish to run an...
1
2371
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, c.phone As PriPortPhone FROM mppaContacts c Dropdown list box works well .....
16
3488
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 renaming the duplicate records? My thinking was to take the results of the duplicate query, and somehow have it number each line where there is a duplicate (tried a groups query, but "count" won't work), then do an update query to change the duplicate to...
0
8411
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8323
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8838
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8739
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8613
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7351
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, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5638
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2740
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.