SIGN UP MEMBER LOGIN:    
Blog

How to use multiple checked items from the CheckedListBox?

Posted by Ghanashyam Nayak Blogs | Windows Controls C# Feb 01, 2012
In this code you can know that how to retrieve the multiple checked items from the CheckedListBox & store into the listbox...

using System;

using System.Windows.Forms;

 

namespace Blog

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }

 

        private void myButton_Click(object sender, EventArgs e)

        {

            //First of clear all previous items from the Listbox otherwise it will append the items...

            myListBox.Items.Clear();

 

            //one by one it will fetch the items from the checked items from the Checkedlistbox..

            foreach (var item in myCheckedListBox.CheckedItems )

            {

                //Add the retrieved item into the Listbox...

                myListBox.Items.Add(item);

            }

        }

    }

}



See Below Image :


Result.jpg

share this blog :
post comment