1
Reply

Load Items Of ComboBox into DataGridViewComboBoxColumn

zozo mehr

zozo mehr

Mar 26 2013 1:41 PM
1.3k

hello

i have a comboBox that gets Items from database . i wanna put it's items into a DataGridViewComboBoxColumn . i use this cod but Second Foreach dosn't work.

foreach (DataGridViewRow row in dvg.Rows)
{

   foreach (string item in ComboBox1.Items)
     {

((DataGridViewComboBoxCell)row.Cells[4]).Items.Add(item);

      }

}

 

 

 

 


Answers (1)