Question checkedcombobox selection from database to datagridview

ud2008

Well-known member
Joined
Jul 5, 2010
Messages
148
Programming Experience
Beginner
Ok, I hope someone can help me with this problem.

I use vb2010 to create a simple windows form.
I have a checkedcombobox which gets its items from a column (titles) from a .mdb database (this works).

When I check an item or multiple items in the combobox, I want to display (multiple columns) the title and for example info in a datagridview.

How can I do this

Thanks in advanced
 
There is no such control in the .NET Framework, so you must have got it from a third-party. Most of us will not know anything about that control as we have never used it and even those who have won't know whether the one you're using is the same one they used because you haven't told us which one it is. Please don't make us guess. Please provide us with all the relevant information.

That said, it's going to be a simple case of handling the appropriate event and getting the data from the appropriate property, as is basically always the case with WinForms. You've got the documentation for the control so you can read it to determine which event and which property. If I had to guess, I'd say ItemChecked and CheckedItems.
 
Thanks for the reply,

Yeah I wasn't very clear with the info.

Checkedcomboboxedit (this the name of the component) is a devexpress component.

I've look at the documentation they have, but I couldn't find a thing that I could work with.

The only thing I found, was the following piece of code, but it doesn't do what I think it should:
VB.NET:
Private Sub PopulateDataGridView()
        For Each item As CheckedListBoxItem In CheckedComboBoxEdit1.Properties.GetItems()
            If item.CheckState = CheckState.Checked Then
                DataGridView1.Rows.Add(item.Description, item.Value)
            End If
        Next item
    End Sub
 
Back
Top