Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6328007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:22:54+00:00 2026-05-24T17:22:54+00:00

I currently have a CheckedListBox with several boxes. I want to be able to

  • 0

I currently have a CheckedListBox with several boxes. I want to be able to test every Checkbox in the list to see if it’s checked, and if it is, add it’s text value (CheckBox.Text) to a List of strings.

Here is what I have:

for ( int i = 0; i < multiTaskChecks.Items.Count; i++ )
{
    if ( multiTaskChecks.GetItemChecked(i) )
    {
        checkedMultiTasks.Add(multiTaskChecks.GetItemText(i));
    }
}

Using this, GetItemText is returning 0, 1, 2, 3, etc instead of the text values that I’m after. I have also tried CheckedListBox.Text.IndexOf(i), CheckedListBox.Text.ToList(), each without any luck.

I just cannot get the label text of one of these CheckBoxes from the CheckedListBox. Any help with this would be really appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T17:22:55+00:00Added an answer on May 24, 2026 at 5:22 pm

    Firstly, you should be able to loop through the checked items only like so

    foreach (var item in multiTaskChecks.CheckedItems)
    {
    }
    

    then depending on the type of the item, get whatever property you want from it. Sounds like it is just a Text or you just want the string, so

    foreach (var item in multiTaskChecks.CheckedItems)
    {
        checkedMultiTasks.Add(item.ToString());
    }
    

    or I prefer

    checkedMultiTasks.AddRange(multiTaskChecks.CheckedItems.
        OfType<object>().Select(‌​i => i.ToString()));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i currently have a list of classes every class starts a scheduler like this:
I currently have a Gridview , And I want to use client-side validation to
I currently have links w/ class=ajax that I want to retrieve the element with
I currently have a list box set up as follows: .xaml: <ListBox Name=DetailsList ItemsSource={Binding}
I currently have: $('.tweet').text(function (_, text) { var exp = /(#(\S+))/g; return text.replace(exp, '<a
I currently have MyRepositories |-- ThisRogueRepository | |-- app I want: MyRepositories |-- ThisRogueRepository
I have made a CheckedListBox using the following: <ListBox x:Name=lst_checkBoxList ItemsSource={Binding}> <ListBox.ItemTemplate> <DataTemplate> <CheckBox
Currently have a list of images in an unordered list. <ul id=sponsors><li><img src=.../></li> <li><img
I currently have a routes object that has several regular pages, and would like
I currently have a working menu test for my restaurant that reads input received

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.