Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Question about ListView

Hellow guys
I have a ListView that contains items with checkboxes.
I have created 2 buttons (SELECT ALL, DESELCT ALL) and they are working fine (all checkboxes are checked or unchecked).
What I want to know is how could I detect if an item checkbox is unchecked ?
Which event I should use to veriify this ?
If you have code in C# showing how to do it, please post it.

Thank you all
[410 byte] By [Michael] at [2007-11-11 10:15:34]
# 1 Re: Question about ListView
To determine whether an item is checked, test its .Checked property:

listView.Items[key].Checked;
- or -
listView1.Items[index].Checked;

If you want to execute code when an item is checked, put code in the ListView's ItemChecked event.
Phil Weber at 2007-11-11 20:48:21 >
# 2 Re: Question about ListView
It worked !
Thank you very much !
Michael at 2007-11-11 20:49:21 >