views:

447

answers:

1

Hi!

First of all sorry because I don't know if this question is correct to put here.

I have a little problem with a little VB.NET application that I am building. This is a winforms applications not WPF.

I have a checkedlistbox with a few items and I want to allow user to select more than one using arrows keys or mouse clicks combined with shift and ctrl keys so I set selectionMode property to multiExtended.

In design time it is not possible I get an error: It says value property is not valid.

and if I set it in runtime by doing:

clbEmployees.SelectionMode = SelectionMode.MultiSimple

I get an error too: It says CheckedListBox is not compatible with multiple selection.

How could I do this?

Thanks!

A: 

It's not supported for the CheckedListBox.

However, I'm fairly sure that you could mimic that functionality in a ListView. Just look at the CheckBoxes and MultiSelect properties of the Listview. As far as I can tell from the documenation those are compatible.

ho1
Great idea! After searching documentation I have heard about checkedlistbox not supporting multiSimple, multi-Extend selection mode, only one selection. As far as I know now, multi selection is only supported by listbox. I have been searching information on how to do it with listview as you say, I mean, listview combined with checkboxes, and there is a nice example in this link:http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.checkboxes.aspxI hope It can help other people.Thanks for your idea.