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

  • SEARCH
  • Home
  • 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 3212120
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T14:48:18+00:00 2026-05-17T14:48:18+00:00

I have an instance of System.Windows.Forms.CheckedListBox which displays a list of tick boxes and

  • 0

I have an instance of System.Windows.Forms.CheckedListBox which displays a list of tick boxes and I have some other System.Windows.Forms objects in my application. I would like to, depending on what the user selects using the other System.Windows.Forms items, show or hide different items in the System.Windows.Form.CheckedListBox. How could I achieve this?

Note: this is for a windows desktop application, not a webpage.

  • 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-17T14:48:19+00:00Added an answer on May 17, 2026 at 2:48 pm

    There is no easy way to hide an item in a CheckedListBox, you have to remove it, like Brendan Vogt showed you.

    An alternative is to take advantage of data binding. It is not supposed to work for CheckedListBox, the documentation of the DataSource property says:

    This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
    Gets or sets the data source for the control. This property is not relevant for this class.

    However, I used it in the past, and it works fine. So if you assign a DataView as the DataSource for the list, you can filter its items using the RowFilter property

    DataView view = new DataView(productsDataTable);
    checkedListBox.DataSource = view;
    checkedListBox.DisplayMember = "Name";
    ...
    
    // Hide discontinued products
    view.RowFilter = "Discontinued = False";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a subclass of System::Windows::Forms::UserControl which allocates some unmanaged resources which have to
I have a snippet of code in my application ( which references System.Windows.Forms )
I have my own custom control derived from System.Windows.Forms.TreeView which is present on the
On Visual Studio 2008, I have an instance of System.Windows.Forms.TabPage. There are many controls
I have a custom control: it's managed code, which subclasses System.Windows.Forms.Control. I want to
I have some code using a System.Transactions.TransactionScope , that creating a new instance of
I have a class: public class LED { public System.Windows.Forms.Label lbl; public LED(System.Windows.Forms.Label lblLED)
I have the following classes: using System; using System.Windows.Forms; namespace FastEyeControl { public partial
I have an MDI Windows Forms application (.net 2008) that allows the user to
Is it possible to fetch a System.Windows.Forms.ContextMenu instance from a handle? By fetch I

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.