Page 1 of 2

Multiple select listview with checkbox's

Posted: Wed Feb 10, 2016 8:19 pm
by Rodent
Hi,

I'm creating a list of information in a listview control that has checkboxes set to true and muliselect set to true.

when I highlight say 3 items the control is only checking two items as seen in the attachment.

Is this something that you can fix, is it by design or is it a Microsoft problem....


Regards
Rodney

Re: Multiple select listview with checkbox's

Posted: Thu Feb 11, 2016 2:21 am
by jvierra
Check and select are not the same thing. You need a full click to check.

Re: Multiple select listview with checkbox's

Posted: Thu Feb 11, 2016 2:26 am
by jvierra
Select all items by shift select or click select and click any checkbox and all will be checked. Thisis pretty much the default behavior of all forms that use a checked listview.

Re: Multiple select listview with checkbox's

Posted: Sun Feb 14, 2016 6:53 pm
by Rodent
jvierra wrote:Check and select are not the same thing. You need a full click to check.
When I select multiple items they are being checked automatically, so when I select the first item and then shift select the third item the first two are being checked automatically (as attachment shows), I then have to check the third item manually by clicking on the checkbox of the third item (I should not have to do this), subsequence clicking of checkbox will check or uncheck all highlighted items.

When I write the same code in VS.net selecting multiple items does not check the checkboxes but clicking on one of the selected checkboxes they are all checked or unchecked. This is the proper behavior of a listview object.

regards
Rodney

Re: Multiple select listview with checkbox's

Posted: Sun Feb 14, 2016 7:00 pm
by Rodent
The same goes with control clicking, I select the first item I would like to check then hold control down and select the second item I would like to check but only the first item is checked.
All subsequence selecting is the same the previously selected item is checked and not the item currently being selected so once I have finished highlighting all the items I want I still have to check the last item by clicking on its checkbox.

This is not the correct behavior.

Regards
Rodney

Re: Multiple select listview with checkbox's

Posted: Sun Feb 14, 2016 7:29 pm
by jvierra
VS - PowerShell. Doesn't matter. Windows handles the behavior. It is the same control everywhere.

By default selecting a row in a listview does NOT check the box. You need to click on the checkbox to check it.

Re: Multiple select listview with checkbox's

Posted: Sun Feb 14, 2016 8:58 pm
by Rodent
jvierra wrote:VS - PowerShell. Doesn't matter. Windows handles the behavior. It is the same control everywhere.

By default selecting a row in a listview does NOT check the box. You need to click on the checkbox to check it.
That is not the behavior that I am experiencing! When I select more then one item the checkbox is being automatically checked.

Re: Multiple select listview with checkbox's

Posted: Sun Feb 14, 2016 9:05 pm
by jvierra
Not for me. What have you changed in options and what code is altering the checkbox.

Download the sample and run it . It behaves correctly.

Re: Multiple select listview with checkbox's

Posted: Sun Feb 14, 2016 9:19 pm
by Rodent
jvierra wrote:Not for me. What have you changed in options and what code is altering the checkbox.

Download the sample and run it . It behaves correctly.
OK I have found that you need multiple columns and FullRowSelect = true

Regards
Rodney

Re: Multiple select listview with checkbox's

Posted: Sun Feb 14, 2016 9:20 pm
by Rodent
And yes I have found that VS works the same.

So I'll go with this is a Microsoft bug.