Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > DataBinding CHECKEDListBox, how to make system autocheck items in the chkList as it populates items in it???
 

DataBinding CHECKEDListBox, how to make system autocheck items in the chkList as it populates items in it???

I m using VS2003, VB.net

My question is, as we proide datasource property in the binding object for chkListBox, then assigns DisplayMember, ValueMember to bind the ChkList & it automatically pops the list [without writing any more code]

I m talking about this

lstInActive.DataBindings.Add(New Binding("DataSource", objFcPartySetup.DSPartySetup, "PartyInActiveRoles"))

lstInActive.DisplayMember = "NameField"

lstInActive.ValueMember = "IdField"

but the chkList gets populated with no item checked, HOW WE TELL THE BINDING OBJECT TO CHECK THESE ITEMS WITH RESPECT TO SUCH DATABASE FIELD & KEEP UNCHECK SUCH ITEMS??????????????????

apart from writing a for loop & checking ourselves, can there be a CHEKEDMEMBER property which we assign a database fieldthe system does the rest of work, I hope i have made my self clear???

maqk  Tuesday, December 05, 2006 9:35 AM

Hello Everyone,

Even i've got similar situation. Anyone with the answer please?

Thanks
Sunny.

Sunny Kumar  Sunday, July 26, 2009 7:22 AM

You can use google to search for other answers

Custom Search

More Threads

• Adding a Link to a datagrid that is using mapping...
• Transaction, Row State after insert with RaiseError raised in the Child Table.
• Can anyone tell me what logic can i apply in the following situation? (Parsing)
• Informing BEFORE deleteting
• replacing char during digit on datagridview
• DataGridView DataBinding ToString Interfaces Problem
• Datagrid
• whenever user INSERTS a new record,current date must be displayed in the DATETIME picker contro
• ComboBox with null values.
• Setting SelectedValue of Listbox - rookie issues