how to bind data to windows checklistbox
Messages   Related Types
This message was discovered on microsoft.public.dotnet.framework.windowsforms.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Post a new message to this list...

Maddy Balakrishnan via .NET 247 (VIP)
(Type your message here)

--------------------------------
From: Maddy Balakrishnan

Hi,
I have the same problem but i'm using windows checklistbox in vs2003.net. But i can't find a properties datasource, displaymember.. as we have in combobox.... pls help me .. thanks in advance..

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>bvViG2gs/keAD7E2cCBvXg==</Id>
Reply to this message...
 
    
Sijin Joseph
Very strange even thought the documentation and intellisense and even
the propertygrid shows no datasource property, there is no compile time
error when i set the datasource and it actually works in a small sample
app i tried.

http://www.windowsforms.net/Forums/ShowPost.aspx?tabIndex=1&tabId=41&PostID=16490
http://www.codenotes.com/articles/articleAction.aspx?articleID=2148

Maybe the databinding in the CheckedListBox control is screwed, but it
definitely works, it has a DataSource property and a DisplayMember and
ValueMember prop as well.

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph

Maddy Balakrishnan via .NET 247 wrote:
[Original message clipped]

Reply to this message...
 
    
sasi (VIP)
Checkedlistbox has a bug with databinding.

If you bind a datatable to checkedlistbox, check few items and add a new row
to the datatable, all the checks would be cleared. microsoft has acknowledged
this as a bug and that is probably the reason why they took datasource
property out of vs.net 2003 and didnt have guts to tell developers about it
prior to release of the vs.net 2003.

There is a workaround to re check all the checked items after you add a new
row to the data table.

"Sijin Joseph" wrote:

[Original message clipped]

Reply to this message...
 
 
System.Windows.Forms.CheckedListBox




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com