Friday, December 7, 2012

Binding Checked List box control with data


        CheckedListAccount.DataSource = Dset.Tables(0) ' Dataset containing datatable

        CheckedListAccount.DisplayMember = "account_name" 'display field
        CheckedListAccount.ValueMember = "account_id"        'id filed

'to get selected items id from checked list box


        For Each checkeditem As DataRowView In CheckedListAccount.CheckedItems
            MsgBox(checkeditem.Item("account_id").ToString())
        Next


No comments:

Post a Comment