473,372 Members | 975 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,372 software developers and data experts.

Urgent! IEnumerator and InvalidOperationException


I'm having problems in enumerating checked items of checkedlistbox. I'm trying to do following

string sVal

foreach(myObject _myobj in checkedListBox1.CheckedItems

sVal = _myobj.value
MessageBox.Show( this, "Value = " + sVal)
The checkedlistbox is in tabPane, which in turn is in tabControl. When doing the foreach, the debugger does succesfully first round, but in the beginning of second iteration round System.InvalidOperationException is thrown. I suppose, that runtime may "clear" checkedlistbox after control has exited. How can I prevent this

My application aims in the following procedure

tabPane1 contains checkedlistbox1 of car manufacturer
tabPane2 contains checkedlistbox2 of car mode
tabPane3 contains checkedlistbox2 of engine typ

I'd like to display multiple car models and compare their properties with each other. E.g

tabPane1 a list of car brands is shown, user chooses Volkswagen and Volv
tabPane2,a list of appropriate models from DB is fetched based on user's previous choices, and the user chooses (VW) Passat, (VW) Golf and (Volvo) S40, (Volvo) V7
tabPane3, again DB calls, user wants to compare VW Passat 1.9TDi Comfort Line, VW Golf 1.8 First Line and Volvo S40 1.8T and Volvo V70 2.5TDi Wago

-> program fetches appropriate information about the chosen car models from DB and displays comparison data for the user

Any good examples, design tips and patterns concerning this is highly appreciated. Sorry for my poor English and a little complicated sample

Nov 15 '05 #1
0 1008

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

Similar topics

by: Rob | last post by:
I have a form - when you click the submit button, it appends a variable to the URL (e.g. xyz.cgi?inputID=some_dynamic_variable) It also opens a new page. Now, that some_dynamic_variable is...
by: Stefan Bauer | last post by:
Hi NG, we've got a very urgent problem... :( We are importing data with the LOAD utility. The input DATE field data is in the format DDMMYYYY (for days) and MMYYYY (for months). The target...
by: Mike | last post by:
Hello, I have a few rather urgent questions that I hope someone can help with (I need to figure this out prior to a meeting tomorrow.) First, a bit of background: The company I work for is...
by: Tamir Khason | last post by:
Follwing the struct: public struct TpSomeMsgRep { public uint SomeId;
by: | last post by:
Hi all, I have a website running on beta 2.0 on server 2003 web sp1 and I keep getting the following error:- Error In:...
by: zeyais | last post by:
Here is my HTML: <style> ..leftcolumn{float:left;width:300px;border: 1px solid #ccc} ..rtcolumn{float:left;width:600px;border: 1px solid #ccc} </style> <body> <div class="leftcolumn"...
by: dembla | last post by:
Hey Frnds can anyone help me in this i need a program in 'c' PROGRAM to print NxN Matrix 9 1 8 1 2 3 2 7 3 as 4 5 6 6 4 5 7 8 9 in sorted form
by: ginnisharma1 | last post by:
Hi All, I am very new to C language and I got really big assignment in my work.I am wondering if anyone can help me.........I need to port compiler from unix to windows and compiler is written...
by: N. Spiker | last post by:
I am attempting to receive a single TCP packet with some text ending with carriage return and line feed characters. When the text is send and the packet has the urgent flag set, the text read from...
by: Cirene | last post by:
I used to use the Web Deployment Project with my VS2005 projects. Now I've fully upgraded to VS2008. Do I have to download a new version of the Web Deployment Project? If so where can I find...
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...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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...
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...
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.