I’m trying to select all items in checked list box when check box All is checked”
How to get that, here is my code
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
if (cbAll.Checked)
{
if(clbViruslist.Items.Count > 0)
{
// here clbViruslist is the checked list o
// for(int i=0;i<clbViruslist.Items.Count;i++)
// clbViruslist.SetSelected(i,true);
// clbViruslist.SetSelected(0,true ) ;
}
}
}
1 Answer