ComponentOne MultiSelect for WinForms
Data Binding / MultiSelect in Unbound Mode
In This Topic
    MultiSelect in Unbound Mode
    In This Topic

    In unbound mode, you can populate the control with data by generating its content. For generating content, you need to add items either at design time, or at run time.

    The following code populates C1MultiSelect control with customer names when the form loads at run time.

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
        C1MultiSelect1.Items.Insert(0, New C1.Win.Input.C1CheckListItem("John"))
        C1MultiSelect1.Items.Add(New C1.Win.Input.C1CheckListItem("Alex"))
        C1MultiSelect1.Items.Add(New C1.Win.Input.C1CheckListItem("Sean"))
    End Sub
    
    private void Form1_Load(object sender, EventArgs e)
    {
        c1MultiSelect1.Items.Insert(0,new C1.Win.Input.C1CheckListItem("John"));
        c1MultiSelect1.Items.Add(new C1.Win.Input.C1CheckListItem("Alex"));
        c1MultiSelect1.Items.Add(new C1.Win.Input.C1CheckListItem("Sean"));
    }