cmbSource = new ComboBox[dtExelData.Columns.Count]; cmbDestination = new ComboBox[dtExelData.Columns.Count]; for (int i = 0; i <= dtExelData.Columns.Count - 1; i++) { cmbSource[i] = new ComboBox(); cmbSource[i].Name = Convert.ToString("cmbSource" + i); cmbSource[i].Location = new Point(100, x); this.Controls.Add(cmbSource[i]); cmbSource[i].DataSource = lHeader; // MessageBox.Show(cmbSource[i].Name.ToString()); cmbDestination[i] = new ComboBox(); cmbDestination[i].Name = Convert.ToString("cmbDest" + i); cmbDestination[i].Location = new Point(400, x); this.Controls.Add(cmbDestination[i]); cmbDestination[i].DataSource = dsTblColumns.Tables[0]; cmbDestination[i].DisplayMember = "column_name"; cmbDestination[i].ValueMember = "column_name"; x = x + 40; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)