This project has moved and is read-only. For the latest updates, please go here.

CheckComboBox: How Do I get the selected Items. ?

Aug 27, 2012 at 6:16 PM



I am binding the CheckCombobox to Datatable.



up to this works fine, but when user selects the item from the dropdown. The TEXT  which is displayed at the top shows "SYSTEM.DATAROW.ROWVIEW" object and not the "name" 

so then i thought to get the selectedItems property and assign it to cbcontrolID.Text property. 

Can you please help me with this ? 

Aug 27, 2012 at 7:18 PM

DataTable / DataRow classes are not supported directly by the CheckComboBox and CheckListBox

Their usage are intended to be used with list of user objects with specific properties. (Ex. List<Person>, and the "DisplayMemberPath" refer to the CLR property "Name"). Property access thru an indexer haven't been tested and probably won't work. You can try to specify "[name]" for DisplayMemberPath but I would be surprised if it work.

This is also an incorrect understanding of "SelectedMemberPath". This optional path refer to boolean property of your data item that indicate the "selection" status of the item. Most of the time, you will call this property "IsSelected". It will be set to "true" when the item is selected, and to "false" when the item is unselected.

A feature request has been created based on your need:

Aug 27, 2012 at 7:22 PM

Do you refer to the following class ?


Since it implement ICustomTypeDescriptor, it "could" work directly. Have you tried "Name" instead of "name" (Uppercase for first letter) ?