Multi selection list box in WinForms - winforms

I am looking for way to implement multi selection enabled list box in windows forms C#.
Any suggestions?
Thanks.

Just add a ListBox control and set the Property: SelectionMode = SelectionMode.MultiExtended
Then you can get the selected items in: ListBox1.SelectedItems

Related

WPF Telerik DataFormCombobbox losed its selected item in edit mode

I am using WPF Telerik dataform & Grid, I have set the auto generate columns to false for the dataform where as I set it true for the grid.
DataFormCombobox loses its selected item when I enter edit mode in the data form. Please some one help.
Regards,
Kannan M.
I got an answer myself, It looks like it happens only when I use DataFormCombobox, When I change it to DataFormDataField inside which I kept the RadCombobox, and set the same binding which had no such issue.It's a workaround but I could not se any other option.

How to type text into a combobox?

I am implementing in WPF. With the normal WPF ComboBox you can only click on an item to select it from the menu that rolls down. I need a control where if the preferred item isn't in the ComboBox you can type this new, not existing, item into the ComboBox?
How do I do this and with what control?
Thanks
As morgan said, you can use IsEditable="true" for the combo box or else there is another control available in WPF tool kit "AutoCompleteBox".
Here are couple of links which helps you in implementing "AutoCompleteBox"
http://iserialized.com/using-the-autocompletebox-in-the-wpf-toolkit/
http://www.c-sharpcorner.com/UploadFile/dpatra/537/
I got the same... http://msdn.microsoft.com/en-us/library/ms753382%28v=vs.85%29.aspx
Just go to property of that combo box control and make the "DropDownStyle" as "DropDown".

Silverlight Editable Combo Box

I want to use comobox which is editable in my silverlight project, but silverlight doesnt provide a such control.
If any one knows how to create a custom editable combobox in silvelight 4.0 then please help me.
Editable combobox means:
A combo box providing list of
options.
User can enter the value.
Filtering.
Sounds like you are looking for the AutoCompleteBox.
Allows user to type value
Can simply dropdown like a combox
Partial value typed can be used to filter choices using either StartsWith or Contains mode.
Supports a create new entry operation if the final typed value does not match any existing entry
This control is part of the standard SDK and is found in the System.Windows.Controls.Input.dll. You should be able to drag it from the toolbox.
You can also have a look Lookup Combo Box

Programmatic multi-select on the Silverlight DataGrid control

Is it possible to programmatically perform multi-select operations (eg. extend selection, remove selection) on the Silverlight 4 DataGrid control?
I didn't notice it at first, but the SelectedItems collection on the DataGrid is directly editable. So you can add/remove things on that collection directly to change selection.

WPF Custom Control Design question

I have a design question:
If you had to make a WPF Combobox with search support,
(= combobox that shows a popup with some Buttons, Search TextBox, List.. etc
the selected item feed to the default's ComboBox TextBox.)
What would you do?
Write a custom control (diretly inheriting from System.Windows.Control)
Write a custom control inheritnig from Selector / ComboBox
Make a UserControl
Use a default ComboBox with a 'special Template' (CotnrolTemplate/Style ?) extended to search functionality
Use a default ComboBox with style and attached EventHandlers..
Thank you guys !
I have done that, and the method i used was option 2 - i did a template control inheriting from a third party combo, and replaced the popup contents with my own template.

Resources