Hi
I have Created 10 Comboboxes(C0,C1,------,C9) Dynamically,
with Datasource,DisplayMember,ValueMember.
When i am going to Select a value From C0, The other C1----C9
Values are also getting effected.
how to make each Combobox as Individual Selection?
Here is MyCode:
private void addcontrols(int num)
{
for (int n = 0; n < num - 1; n++)
{
cb = new ComboBox();
cb.Name = "cmbRelationshipDyn" + n;
cb.Size = new Size(133, 21);
cb.DropDownStyle = ComboBoxStyle.DropDownList;
if (n == 0)
{
cb.Location = new Point(86, ((n + 1) * 5) + 0);
}
else
{
cb.Location = new Point(86, ((n) * 35) + 0);
}
cb.SelectedIndexChanged += new EventHandler(cb_SelectedIndexChanged);
cb.DataSource = dtrel;
cb.DisplayMember = "Relationship";
cb.ValueMember = "ID";
panel1.Controls.Add(cb);
}
}
void cb_SelectedIndexChanged(object sender, EventArgs e)
{
}
Any body's help would be really appreciated.
Regards,
Pawan.