Question : use menu item to add data to combo box

Hello,
I have a c# form - one combobox- and  I wonder if its possible from an Add Employee Number menu item - I would be able to add data-to combo box
Thank you
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
namespace example
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void addEmployeeNumberToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }
    }
}

Answer : use menu item to add data to combo box

Yes it is possible, there are various way depending upon what actually you like to achieve.
If the addition is something that is repetitive, say add "item X" to combo box each time one select the menu item.
Or you can ask for input value on menu item click, like a child dialog to accept user input etc, that fill up in the combo box.


Random Solutions  
 
programming4us programming4us