Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Checked List Box Data

Posted on 2009-06-30
2
343 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

807 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