This topic illustrates how to add multiple columns in Design view and in Source view.
Adding Multiple Columns in Design View:
To add multiple columns to the combobox, follow these steps:
Member | Name |
---|---|
0 |
Column1 |
1 |
Column2 |
2 |
Column3 |
3 | Column4 |
Click OK to save and close the C1ComboBoxColumn Collection Editor.
Click on the ellipsis button next to the Items property. The C1ComboBoxItem Collection Editor appears.
In the C1ComboBoxItem Collection Editor, click the Add button six times to add six new C1ComboBoxItems to the ComboBox.
Select the member and set the following properties for the ComboBoxItems.
Member | Label | Value | Y-String Values |
---|---|---|---|
0 | Label1 | Value1 |
cellA0, cellA1, cellA2, cellA3 |
1 | Label2 | Value2 |
cellB0, cellB1, cellB2, cellB3 |
3 | Label3 | Value3 |
cellC0, cellC1, cellC2, cellC3 |
4 | Label5 | Value5 |
cellE0, cellE1, cellE2, cellE3 |
5 | Label6 | Value6 |
cellF0, cellF1, cellF2, cellF3 |
9. Click OK to close and save the collection editor.
Adding Multiple Columns in Source View
To add multiple columns to the combobox, select the Source tab and add the following code:
<form id="form1" runat="server">
<div>
<asp:Panel ID="Panel1" runat="server" Height="15px" Width="180px" DropdownHeight="500"
DropdownWidth="400">
</asp:Panel>
<cc1:C1ComboBoxExtender ID="Panel1_C1ComboBoxExtender" runat="server"
TargetControlID="Panel1">
<Columns>
<cc1:C1ComboBoxColumn Name="Column1" />
<cc1:C1ComboBoxColumn Name="Column2" />
<cc1:C1ComboBoxColumn Name="Column3" />
<cc1:C1ComboBoxColumn Name="Column4" />
</Columns>
<Data>
<Items>
<cc1:C1ComboBoxItem Cells="A0,A1,A2,A3" Label="Label1" Value="Value1" />
<cc1:C1ComboBoxItem Cells="B0,B1,B2,B3" Label="Label2" Value="Value2" />
<cc1:C1ComboBoxItem Cells="C0,C1,C2,C3" Label="Label3" Value="Value3" />
<cc1:C1ComboBoxItem Cells="D0,D1,D2,D3" Label="Label4" Value="Value4" />
<cc1:C1ComboBoxItem Cells="E0,E1,E2,E3" Label="Label5" Value="Value5" />
<cc1:C1ComboBoxItem Cells="F0,F1,F2,F3" Label="Label6" Value="Value6" />
</Items>
</Data>
</cc1:C1ComboBoxExtender>
</div>
</form>
This Topic Illustrates the Following:
The following image shows a C1ComboBox with two columns: