Tuesday 5 March 2013

C# ComboBox Dynamic Add Item

private void button11_Click(object sender, EventArgs e)
{
 

         ComboBoxItemAdd item=new ComboBoxItemAdd();

         item.Text="New Item";

         item.Value=2;

         comboBox1.Items.Add(item);

public class ComboboxItemAdd

{

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

         public override string ToString()
         {
                return Text;
          }

Tags : 1. C# .net  ComboBox Control Examples - Dynamic Add Items In C# comboBox

2. C# .net  ComboBox Control Examples - Dynamic Insert Item In C# comboBox

3. C# .net  ComboBox Control Examples - Aadd Items to comboBox Programmatically C#

No comments:

Post a Comment