title: ComboBox2 changes on ComboBox1 change - using LINQ EF Winform C#
body: <p>I have 1 WinForm with 2 Combo boxes, first one is filled with Employee names, and the second one is supposed to be filled with tasks that are affected to every employee listed in the first combo. But could not get the following code to run for the second combo:</p>
  
  <pre><code>            private void Form1_Load(object sender, EventArgs e)
          {
              using (LINQtoEntitiesEntities MyEntities = new LINQtoEntitiesEntities())
              {
                  ObjectQuery&lt;Employee&gt; Emp = MyEntities.Employee;
                  comboBox1.DataSource = (from u in Emp select new { u.ID, u.LastName }).ToList();
                  comboBox1.ValueMember = "ID";
                  comboBox1.DisplayMember = "LastName";
              }
          }
  
          private void comboBox1_TextChanged(object sender, EventArgs e)
          {
              if (comboBox1.SelectedIndex.ToString() == "0") return;
              using (LINQtoEntitiesEntities MyEntities = new LINQtoEntitiesEntities())
              {
                  label1.Text = comboBox1.SelectedValue.ToString();
                  ObjectQuery&lt;Tasks&gt; Tsk = MyEntities.Tasks;
  comboBox2.DataSource = (from t in Tsk where t.EmloyeeID.ToString() == comboBox1.SelectedValue.ToString() select new { t.ID, t.TaskName }).ToList();
                  comboBox2.ValueMember = "ID";
                  comboBox2.DisplayMember = "TaskName";
              }
          }
  </code></pre>
  
  <p>Could fill normally ComboBox1, but not ComboBox2, and it would be great if first line of ComboBox1 is blank.</p>