How to set up the event Datagridviewcombobox cell selectionchanged?

Viewed 1189

I have a DataGridViewComboBoxCell control with some items into it. I would like to get the values when user chooses a value from the dropdown. I cant use DataGridViewComboBoxColumn where EditingControlShowing can be used. I need similar event handler for DataGridViewComboBoxCell. Can anyone help pls.

Please find code sample below:

private DataGridViewComboBoxCell NameDropDown = new DataGridViewComboBoxCell();     

public void SetDropDown(int index)
      {
         NameDropDown = new DataGridViewComboBoxCell();         
         DropDownValues(index);
         for (int j = 0; j < DropDownOld.Items.Count; j++)
         {
            NameDropDown.Items.Add(DropDownOld.Items[j]);
         }
         dataGridView1.Rows[index].Cells[4] = NameDropDown;
      }
1 Answers
Related