• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 408
  • Last Modified:

Binding a CheckedListBox

I have a CheckedListBox on my windows form that I would like to bind to a column in my database.

I have created the connection, adapter & dataset and they work fine because I tested in on a datagrid using a dataview. My question is, how can I bind my CheckedListBox to my column. I have tried various methods, but can't get it to populate.

Any ideas?
0
Craig_Muckleston
Asked:
Craig_Muckleston
  • 2
1 Solution
 
RonaldBiemansCommented:
this works


CheckedListBox1.DataSource = ds.Tables(0)
CheckedListBox1.ValueMember = "id"
CheckedListBox1.DisplayMember = "mytext"
0
 
RonaldBiemansCommented:
"mytext" is the name of the column I wanted to show
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now