Does the event fire for comboBox1_TextChanged, if not rather try the SelectedIndexChanged event. If EmployeeID is an int, rather convert to toInt32 than toString, reason is that "1" != "1 ", so it is better practice to compare int values.
Sami L wrote:
(from t in Tsk where t.EmloyeeID.ToString() == comboBox1.SelectedValue.ToString()
int selectedID;
if(int.TryParse(comboBox1.SelectedValue.ToString(), out selectedID))
{
comboBox2.DataSource = (from t in Tsk
where t.EmloyeeID == selectedID
select new { t.ID, t.TaskName }).ToList();
}
To insert an empty value first in comboBox1 use the insert command after setting the datasource in the form load. the index will be 0 to insert as the first item.
comboBox1.Items.Insert(index, object);
No matter how long he who laughs last laughs, he who laughs first has a head start!