Solved

Checked List Box Data

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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

730 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