Selecting/Deselecting items by checking checkboxes in a listview impossible?
-
hi, I almost tried everything but couldn't make the listview items be selected when checkbox checked and deselected when unchecked. Am I asking for an impossible thing? Checking the boxes to select is fine but when I uncheck any of the items, all of them are unselected. I didn't eat my brain with more complicated problems but this one will make me do it
-
hi, I almost tried everything but couldn't make the listview items be selected when checkbox checked and deselected when unchecked. Am I asking for an impossible thing? Checking the boxes to select is fine but when I uncheck any of the items, all of them are unselected. I didn't eat my brain with more complicated problems but this one will make me do it
What technology stack? Win forms? ASP.NET? WPF? Silverlight?
Forgive your enemies - it messes with their heads
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
What technology stack? Win forms? ASP.NET? WPF? Silverlight?
Forgive your enemies - it messes with their heads
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
Winfoms.Listview
-
Winfoms.Listview
May I ask why the items must be checked/unchecked AND selected/deselected? What you are witnessing is the default behavior of the ListView. When you check multiple items and select each one, and then you uncheck one, it unchecks all items. Just like if you CTRL+Click to select multiple items and then check ONE of them, they all get checked. I am not certain but perhaps you would need to extend the ListView control yourself?
djj55: Nice but may have a permission problem Pete O'Hanlon: He has my permission to run it.
-
May I ask why the items must be checked/unchecked AND selected/deselected? What you are witnessing is the default behavior of the ListView. When you check multiple items and select each one, and then you uncheck one, it unchecks all items. Just like if you CTRL+Click to select multiple items and then check ONE of them, they all get checked. I am not certain but perhaps you would need to extend the ListView control yourself?
djj55: Nice but may have a permission problem Pete O'Hanlon: He has my permission to run it.
Matt U. wrote:
May I ask why the items must be checked/unchecked AND selected/deselected?
-
hi, I almost tried everything but couldn't make the listview items be selected when checkbox checked and deselected when unchecked. Am I asking for an impossible thing? Checking the boxes to select is fine but when I uncheck any of the items, all of them are unselected. I didn't eat my brain with more complicated problems but this one will make me do it
-
Matt U. wrote:
May I ask why the items must be checked/unchecked AND selected/deselected?
I believe you would need some sort of custom control for that, although I am not certain even that would give you exactly what you need. As the last answer stated, why not just use the ListView's selection without checkboxes?
djj55: Nice but may have a permission problem Pete O'Hanlon: He has my permission to run it.