Click here to Skip to main content
15,888,600 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have window application in this I want to show checkedListBox. Here I want to bind checkedlistbox with DataSource..

checkedlistbox,DataSource=dt;
checkedlistbox,DataMember=name;
checkedlistbox,ValueMember=Id;

I Tried it works.

But how can I get Valuemember?





Please help me.

Thank you very much!

Thank you
Seema
Posted
Updated 17-Jan-11 22:11pm
v2
Comments
Shahriar Iqbal Chowdhury/Galib 18-Jan-11 3:20am    
need more details, post your code where you are trying to bind

If you look at MSDN on CheckedListBox(here[^]), you will find under Properties:
"DataSource	Infrastructure. Gets or sets the data source for the control. This property is not relevant for this class."

And:
"Note   You cannot bind data to a CheckedListBox. Use a ComboBox or a ListBox for this instead. For more information, see How to: Bind a Windows Forms ComboBox or ListBox Control to Data."
 
Share this answer
 
v2
You can find an extended CheckedListBox here with DataSource implemented.

A Custom CheckedListBox with Datasource Implementation (Bindable)[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900