Hello All.,
Please give me the answer ASAP.
How to clear checked items in a checkedlistbox in windows form..
plese reply soon
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Satyapriya NayakPosted Oct 18, 2012, 7:08 AM
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication3
{
public partial class Form3 : Form
{
public Form3()
{
InitializeComponent();
}
private void Form3_Load(object sender, EventArgs e)
{
checkedListBox1.Items.Add("a");
checkedListBox1.Items.Add("b");
checkedListBox1.Items.Add("c");
checkedListBox1.Items.Add("d");
}
private void button1_Click(object sender, EventArgs e)
{
while (checkedListBox1.CheckedIndices.Count > 0)
{
checkedListBox1.SetItemChecked(checkedListBox1.CheckedIndices[0], false);
}
}
}
}
Thanks
If this post helps you mark it as answer