Reputation: 1303
How can I trigger unchecking box action in a ListView
control ? In default ListView
events I can only see ItemCheck
and ItemChecked
event where is ItemUnchecked
and ItemUncheck
?
Upvotes: 1
Views: 530
Reputation: 69372
Handle the ItemCheck event and read the NewValue property to determine if it's about to be checked or unchecked.
private void myListView_ItemCheck(object sender, ItemCheckEventArgs e)
{
if (e.NewValue == CheckState.Unchecked)
{
//unchecked
}
else if(e.NewValue == CheckState.Checked)
{
//checked
}
}
Upvotes: 3