Adding ComboBox Items in Code

In this topic, you will learn how to add items to the C1ComboBox control in C# and Visual Basic code. This method is useful when you’re creating a static combo box with just a few items.

Complete the following steps:

To disable AutoComplete, complete the following:

1.   Open the MainPage.xaml.cs page.

2.   Import the following namespace into your project:

      Visual Basic

      C#

3.   Enter Code view and add the following code beneath the InitializeComponent() method:

      Visual Basic

      C#

4.   Run the program.

 This Topic Illustrates the Following:

With the project running, click the drop-down arrow and observe that four items appear in the drop-down list. The result resembles the following image:

 


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.