ComponentOne Extender Controls for ASP.NET Web Forms
Wijmo Control Toolkit Extender Controls / C1ComboBox Extender / Adding Data to the ComboBox
In This Topic
    Adding Data to the ComboBox
    In This Topic

    This topic illustrates how to add data to the combobox in Design View and Source view.

    Adding Data to the ComboBox in Design View:

    To add data to the ComboBox in design view, follow these steps:

    1. Select View | Properties Window in the Visual Studio menu.
    2. Click the drop-down list at the top of the Properties window and select Panel1_C1ComboBoxExtender.
    3. Click on the ellipsis button next to the Items property. The C1ComboBoxItem Collection Editor appears.
    4. In the C1ComboBoxItem Collection Editor, click the Add button four times to add four new C1ComboBoxItems to the ComboBox.
    5. Select the member and set the following properties for the ComboBoxItems.

     

    Member Label Value
    0 c++ c++
    1 java java
    2 php php
    3 coldfusion coldfusion
    4 javascript javascript
    5 asp asp
    6 ruby ruby
    7 c c

     

    1. Click OK to close and save the collection editor.

    Adding Data to the ComboBox in Source View:

    To add data to the ComboBox, click the source tab and add the following code in your source file:

    <cc1:C1ComboBoxExtender ID="Panel1_C1ComboBoxExtender" runat="server"

                TargetControlID="Panel1">

                <Data>

                    <Items>

                        <cc1:C1ComboBoxItem Label="c++" Value="c++" />

                        <cc1:C1ComboBoxItem Label="java" Value="java" />

                        <cc1:C1ComboBoxItem Label="php" Value="php" />

                        <cc1:C1ComboBoxItem Label="coldfusion" Value="coldfusion" />

                        <cc1:C1ComboBoxItem Label="javascript" Value="javascript" />

                        <cc1:C1ComboBoxItem Label="asp" Value="asp" />

                        <cc1:C1ComboBoxItem Label="ruby" Value="ruby" />

                        <cc1:C1ComboBoxItem Label="c" Value="c" />

                    </Items>

                </Data>

            </cc1:C1ComboBoxExtender>

    This Topic Illustrates the Following:

    The following image shows a C1ComboBox with 8 items: