This seems like a simple task but there may be an easier way.
I have a form with 30 comboboxes that all need the same data set. Currently I bind each one:
DataTable t = GetData();
this.ComboBox1.DataSource = t;
this.ComboBox1.DisplayMember = "heading";
this.ComboBox2.DataSource = t;
this.ComboBox2.DisplayMember = "heading";
this.ComboBox3.DataSource = t;
this.ComboBox3.DisplayMember = "heading";
...
...
this.ComboBoxN.DataSource = t;
this.ComboBoxN.DisplayMember = "heading";
Is there a way to bind them all in a less tedius fashion?
Thanks.