Solved

Checked List Box Data

Posted on 2009-06-30
2
342 Views
Last Modified: 2012-05-07
Using C#
I have a Checked list box in my program that i have placed data into.  I need to read the checked items that the user has selected and output them.  How do i search a checked list box for checked vs non checked items.
0
Comment
Question by:cotj73
2 Comments
 
LVL 21

Accepted Solution

by:
Craig Wagner earned 500 total points
ID: 24750568
Something like this (where lstMembers is a CheckedListBox):
for( int i = 0; i <= lstMembers.Items.Count - 1; i++ )
{
    if( lstMembers.GetItemChecked( i ) )
    {
        // lstMembers.Items[i] is checked, so process it
    }
}

Open in new window

0
 
LVL 1

Author Closing Comment

by:cotj73
ID: 31598552
Thank you
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Google Directions API to Map URL -C#? 3 26
converto datetime always changes format 9 37
C# Desktop Application 3 35
.NET 2008 VB and C# 6 28
Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question