Tuesday, 5 March 2013

C# ComboBox Select Item

private void button11_Click(object sender, EventArgs e)
{

           comboBox1.SelectedIndex = 1;

}

Tags : 1. C# .net  ComboBox Control Examples - Select One From C# Combobox and set it as default item.

2. C# .net  ComboBox Control Examples - Select Particular Item From C# ComboBox.

 


 

 

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#

Friday, 1 March 2013

C# ComboBox Remove Particular Item

private void button1_Click(object sender, EventArgs e)
{
 

            comboBox1.Items.Remove(comboBox1.SelectedItem);

Tags : 1. C# .net  ComboBox Control Examples- Remove Particular Item From

ComboBox

2. C# .net  ComboBox Control Examples- Remove Selected Item From

ComboBox