473,396 Members | 1,965 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,396 software developers and data experts.

Updating ComboBox DataSOurce

Bob
I have an ArryList that I'm using as a datasource for a combobox. As an item is selected in the combobox and processed I'd like to remove it from the combobox. When I try I get an error stating that the arraylist is being used as a datasource and can't be updated. I can't remove it as the datasource for the combobox so I can update it and reassign it back as the datasource. Anyone got a workaround?
Nov 20 '05 #1
2 1870
If I understand you correctly, you are bound to an Array, but want to remove
the item from the ComboBox. If this is the case you are asking .NET to do
contradictory things, either its bound or not.

If you want to mainain the data in the array and simply choose not to
display certain items then perhaps you need to consider copying the data to
another array and removing the item from the array instead.

Regards - OHM
"Bob" <Bo*@discussions.microsoft.com> wrote in message
news:A1**********************************@microsof t.com...
I have an ArryList that I'm using as a datasource for a combobox. As an

item is selected in the combobox and processed I'd like to remove it from
the combobox. When I try I get an error stating that the arraylist is being
used as a datasource and can't be updated. I can't remove it as the
datasource for the combobox so I can update it and reassign it back as the
datasource. Anyone got a workaround?
Nov 20 '05 #2
doh,

I was almost giving an answer as this in the next thread from Bob and than
thought, cannot be there must be something why OHM is not giving this
answer..

And now I see I am right.

Cor
If I understand you correctly, you are bound to an Array, but want to remove the item from the ComboBox. If this is the case you are asking .NET to do
contradictory things, either its bound or not.

If you want to mainain the data in the array and simply choose not to
display certain items then perhaps you need to consider copying the data to another array and removing the item from the array instead.

Regards - OHM
"Bob" <Bo*@discussions.microsoft.com> wrote in message
news:A1**********************************@microsof t.com...
I have an ArryList that I'm using as a datasource for a combobox. As an item is selected in the combobox and processed I'd like to remove it from
the combobox. When I try I get an error stating that the arraylist is

being used as a datasource and can't be updated. I can't remove it as the
datasource for the combobox so I can update it and reassign it back as the
datasource. Anyone got a workaround?

Nov 20 '05 #3

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

Similar topics

0
by: CalPARK InterNetStation | last post by:
Could anyone explain why the difference of behavior betweein Case1 and Case2 occurs? Microsoft Visual C#.NET 55607-652-0000007-18218 Windows Forms Application 1. put a TabControl on a Form...
3
by: PeterZ | last post by:
G'day, After doing much searching and pinching bits of ideas from here there and everywhere I came up with a fairly 'clean' solution of including a comboBox into a dataGrid column. You can...
2
by: pei_world | last post by:
I want to implement a key hit with enter to dropdown a combobox that is in the datagrid. in this case I need to override its original behaviours. I found some codes from the web. Does anyone know...
8
by: Steve B. | last post by:
My Program: a local C# ADO.Net application using VS 2003 Right now I have about 5 ComboBox's which provides drop down selection entries from the same MS-Access table via a DataConnection,...
1
by: Bob | last post by:
I have an arraylist (arlNAMES) that is bing used as a datasource for a combobox. When an item is selected in the combobox I want to remove it from both the combobox and the arraylist. This...
3
by: Grant | last post by:
I need some sample code showing how to manipulate data in my access database using C#. This is what Im trying to do: Dropdownlist with datagrid both bound to datasource. When the drop down list...
6
by: dbuchanan | last post by:
VS2005 I've been reading all the help I can on the topic (MSDN, other) but I can't make sense of this. Desired behavior; The user is to choose from the displayed list of the databound combobox...
2
by: samueltilden | last post by:
This problem should be simple. I am using Visual Studio 2003, Version 1.1 I am writing a desktop application in which I am binding a DataTable to the DataSource of a ComboBox. // I have...
2
by: =?Utf-8?B?VmFuZXNzYQ==?= | last post by:
Hi All! I am with a situation where I am not getting the right updating to the form's fields. The situation is the following one: I have one combobox and one textbox. I am using the...
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:
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
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
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 project—planning, coding, testing,...

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.