i have gridview with a combo box column Named ColumnLocationDemo. I want to ensure that user every time selected distinct option from comobox. i am trying this code message box appearing but dont know how to change the index of columnLocationDemo?? there is not selectedIndex property in this gvCombobox

```
private void dataGridView1_RowValidating(object sender, DataGridViewCellCancelEventArgs e)
        {
            string str1 = dataGridView1.CurrentRow.Cells[1].Value.ToString();
            for (int i = 0; i < dataGridView1.Rows.Count - 2; i++)
            {
                string str = dataGridView1.Rows[i].Cells[1].Value.ToString();
                if (str==str1)
                {
                    MessageBox.Show("same occur");
                    ColumnLocationDemo
                }
            }

        }

```