Print Page | Close Window

Assigning an EntityList to a Checked ListBox

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1045
Printed Date: 20-Sep-2025 at 2:23am


Topic: Assigning an EntityList to a Checked ListBox
Posted By: BillG
Subject: Assigning an EntityList to a Checked ListBox
Date Posted: 06-Jan-2009 at 9:17am
How do I assign an entitylist to a checked listbox?
 
I tried this and it works
 
myListBox.DataSource = controller.GetRecords();
 
but it doesn't display the column properly.  How do I tell it to display the proper column like in a listbox where you have a displaymember and a value member?  Is there an easy way to do it or do I have to loop through my entityList?
 
Bill
 



Replies:
Posted By: viola
Date Posted: 06-Jan-2009 at 9:39am
Ever tried override ToString() of your Record?


Posted By: BillG
Date Posted: 06-Jan-2009 at 9:43am
That won't work.


Posted By: viola
Date Posted: 06-Jan-2009 at 10:06am
Oopz, misread the question...


Posted By: davidklitzke
Date Posted: 07-Jan-2009 at 10:05am
I was able to get something to work using a DataGridView and a column of Check Boxes.
 



Print Page | Close Window