Looking for recommendation for good , free, feature rich ComboBox to use in asp.net Webform project

Hello
can someone recommend a good ComboBox that I can use in my ASP.NET Webform project. It should be Free and be as feature rich as possible. Currently using AjaxControlToolkit.ComboBox but find that it is very limited. For instance I am unable to programmatically set the Dropdown list to droppedDown or Closed.  

regards
Pat
LVL 1
pclarke7Asked:
Who is Participating?
 
Dirk StraussSenior Full Stack DeveloperCommented:
I did the following after reading this article ComboBox: Adding Text and Value to an Item (no Binding Source)


public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
    }

    private void Form1_Load(object sender, EventArgs e)
    {
        ComboboxItem item1 = new ComboboxItem();
        item1.Text = "Test Text 1";
        item1.Value = "Test Value 1";

        comboBox1.Items.Add(item1);
            
        ComboboxItem item2 = new ComboboxItem();
        item2.Text = "Test Text 2";
        item2.Value = "Test Value 2";

        comboBox1.Items.Add(item2);
        comboBox1.SelectedIndex = 0;
    }
}

public class ComboboxItem
{
    public string Text { get; set; }
    public object Value { get; set; }

    public override string ToString()
    {
        return Text;
    }
}

Open in new window


You will probably want to add the items to the combobox inside a loop instead of creating a ComboboxItem object over and over again. This way you can read the items you want to add from any data store and the code will loop through that collection and add those items to the COmboboxItem object and add it to the comboBox1 control.

I also went and created a class called ComboboxItem. Just makes things interesting. Hope it helps.
PS: I used the standard Visual Studio combobox control.
0
 
Dirk StraussSenior Full Stack DeveloperCommented:
Have a look at the combobox from Obout. It has a free and paid version by the looks of it.
0
 
pclarke7Author Commented:
Hi Dirk,
thanks for the recommendation. It first glance it looks like it has some good features. However I am struggling to get an example working. I have create a very simple web forms project in VS2012 targeting .NET Framework 4.5.1. In the code behind I specify:

            ComboBox item = new ComboBox();
            item.SelectedText = "Test Text 1 ";
            item.SelectedValue = "Test Value 1";
            item.SelectedIndex=0;
            item.Visible = true;

However the ComboBox appears empty. Is there anywhere I can get some working examples of this control ?

Regards
Pat
0
 
Dirk StraussSenior Full Stack DeveloperCommented:
Only solution provided addresses the issue raised by the author.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.