locked
how to bind a checkedlistbox to a db RRS feed

  • Question

  • I tryed but I couldent bind it to my db
    when I write chklistbox.  there is no Datasourse to bind to and no displaymember option 
    I'm writing in c#

    Saturday, March 6, 2010 8:39 AM

Answers

  • CheckedListBox contains DataSource property and DisplayMember property. But it hidden and hence not displayed in Intellisense.  But you can use it.

    chklistbox.DataSource = dt;
    chklistbox.DisplayMember = "ColumnName";

    Gaurav Khanna Visual Basic MVP
    • Proposed as answer by Khanna Gaurav Sunday, March 7, 2010 5:29 PM
    • Marked as answer by Jing0 Thursday, March 11, 2010 2:36 PM
    Saturday, March 6, 2010 11:48 AM

All replies

  • CheckedListBox contains DataSource property and DisplayMember property. But it hidden and hence not displayed in Intellisense.  But you can use it.

    chklistbox.DataSource = dt;
    chklistbox.DisplayMember = "ColumnName";

    Gaurav Khanna Visual Basic MVP
    • Proposed as answer by Khanna Gaurav Sunday, March 7, 2010 5:29 PM
    • Marked as answer by Jing0 Thursday, March 11, 2010 2:36 PM
    Saturday, March 6, 2010 11:48 AM
  • thanks alot. It worked ;)

    Sunday, March 7, 2010 4:43 PM