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

Populating a CheckedListBox with a System.Collections

Hello!

I'm back again with another problem.

First of all, thank you to Jacob for helping me understand
a bit more about NNTP commands.

So now the problem:

I have a collection of potentially thousands of items. I
would like to load this collection and populate it in a
Windows.Forms.CheckedListBox, while at the same time,
store the items in a database (which I already have
connected).

The first step is VERY basic but yet I'm still having
problems. How can I point the CheckedListBox to the
collection? Right now, the collection is an ArrayList but
I can change it to anything else on a whim, if anyone
suggests it.

Please let me know what you suggest. Thank you very much
to everyone out there!
Nov 15 '05 #1
1 4686
Chibi,

You should be able to set the DataSource property on the CheckedListBox
to the ArrayList. Then, to display the contents, you will have to set the
DisplayMember property to the name of the property that you want to be used
when displayed in the listbox. Also, you can set the ValueMember property
to the value that is returned from the listbox as well (instead of relying
on a display name).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Chibi" <an*******@discussions.microsoft.com> wrote in message
news:09****************************@phx.gbl...
Hello!

I'm back again with another problem.

First of all, thank you to Jacob for helping me understand
a bit more about NNTP commands.

So now the problem:

I have a collection of potentially thousands of items. I
would like to load this collection and populate it in a
Windows.Forms.CheckedListBox, while at the same time,
store the items in a database (which I already have
connected).

The first step is VERY basic but yet I'm still having
problems. How can I point the CheckedListBox to the
collection? Right now, the collection is an ArrayList but
I can change it to anything else on a whim, if anyone
suggests it.

Please let me know what you suggest. Thank you very much
to everyone out there!

Nov 15 '05 #2

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

Similar topics

4
by: Ram | last post by:
Dear Helpers, I assigened values to checkedlistbox control in the following way cList.DataSource=oDs.Tables.DefaultView; cList.DisplayMember=oDs.Tables.Columns.ToString();...
0
by: | last post by:
David, A partial answer to your question: The 'MultiColumn' property of a CheckedListBox does not cause it to display multiple FIELDS of an item... it causes it to display the items...
5
by: | last post by:
Trying to learn about manipulating collections of objects, and populating these objects dynamically from datasources. Could someone post a code sample that shows the following: Instantiating a...
4
by: Matthew | last post by:
Hi, I am using a checkedlistbox on a windows form and binding it to a collection of classes. clbAliases is the checkedlistbox control selectedplace is a class with property placealiases.This...
8
by: Derek Martin | last post by:
Here is some code that I need help with please: Dim result As New ArrayList Try For i = 0 To objecttest1.PersonList.person_returnnumber - 1 result =...
2
by: Manuel Canas | last post by:
Hi there, I'm having this dilema with a checkedlistbox. I have an array of items in there, what I want to accomplish is the following; The user could check all the items in the...
6
by: Steve Teeples | last post by:
Can someone show me an example of how to place a "CheckedListBox" property within a PropertyGrid? -- ----------- Thanks, Steve
0
by: engblom | last post by:
I'm trying to get the check items text from a checkedlistbox? This code below results in: List that this enumerator is bound to has been modified. An enumerator can only be used if the list does...
1
JustRun
by: JustRun | last post by:
Hi all, I have a problem with populating a CheckedListBox from dataTable, I dont know the properties that bind the displayMember and valueMember Using windows application .NET 2005 with Sql 2005...
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: 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$) { } ...
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: 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...
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
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,...

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.