Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataBinding and CheckedListBox

Status
Not open for further replies.

mrdance

Programmer
Apr 17, 2001
308
SE
I am trying to do this:

chkGridColumns.DataBindings.Add(New Binding("Checked", DTHeaders, "CHECKED"))

But I can't find anything member called "Checked", which member is it or how can I add a databinding to control the checked items?

--- neteject.com - Internet Solutions ---
 
Set the DataSource and DisplayMember properties of the CheckedListBox as shown below:

CheckedListBox1.DataSource = DataSet1.Tables("TableName")
CheckedListBox1.DisplayMember = "Field"

Hope this helps
 
Well, this works for the "caption" in the list but what about the "checked" or not? It seems that valuemember does not affect that. I am curious about using the databinding to set my own column for a certain value.

--- neteject.com - Internet Solutions ---
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top