ScriptSpot

Forum topic · General Scripting

Checkboxes - DotNet

By JokerMartini · 2010-12-05

Description

How do I uncheck all checkboxes in the first column of a Listview in DotNet?


for i=1 to listview_rollout.dncTaskList.Items.count do
(
listview_rollout.dncTaskList.Items[i].checked = true
)

Comments (3)

Swordslayer · 2010-12-05

Note that dotnet collections are zero-based, so the loop has to be like this:

for i = 0 to (listview_rollout.dncTaskList.Items.count - 1) do ...

Budi G · 2010-12-05

Hi Swordslayer, nice info . thank you.
I'm not to familiar with dotNet . i'm still learning about that...

regards

Budi G · 2010-12-05

You can try like this:

for i=1 to listview_rollout.dncTaskList.Items.count do
(
  lvitems = listview_rollout.dncTaskList.Items
  lvitems[i].checked = not lvitems[i].checked -- it's like a switcher in a single button
)