CheckedListBox set data

Posts   
 
    
gj1118
User
Posts: 30
Joined: 21-Jul-2010
# Posted on: 28-Aug-2010 06:36:53   

Hi I am back again. sorry for being a pain in the butt...

I am using LLBLGEN 3.0 self servicing.

I have been trying to work this out, but it continues to baffle me .. I have a checklistbox , winforms

I am binding it like this


            CategoryCollection categories = CategoryController.GetCategories(CategoryFields.IsDeleted == false);
            checkedListBoxCategories.DataSource = categories;
            checkedListBoxCategories.DisplayMember = CategoryFields.CategoryName.Name;
            checkedListBoxCategories.ValueMember = CategoryFields.CategoryId.Name;

I can save and persist data.. everything works perfectly well

The problem arises when I try to set the checkboxes.. I know that I can get the checked values like this


priceSchemeEntity.PriceSchemeCategories

but how to set the checkboxes.. i have tried everything but everything baffles me now .. and I am perplexed.. any help would be GODsend and praised...

Thanks and Regards Gagan

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 28-Aug-2010 09:32:29   

It's more a .net question than an LLBLGen one.

It looks like if CheckedListBox hass problems concerning with that databinding scenario (http://msdn.microsoft.com/en-us/library/system.windows.forms.checkedlistbox.aspx).

Please give a try to this: http://www.codeproject.com/KB/combobox/ExCheckedListBox.aspx

David Elizondo | LLBLGen Support Team