Select value and text both from DataGridViewComboBoxColumn c#
<p>suppose i have one datagridview and datagridview has one DataGridViewComboBoxColumn.
i have populate datagridview combobox column with country name and code.</p>

<p>so now i want that when i am reading datagridview cell value in for loop then i want get DataGridViewComboBoxColumn selected value and text. i could not get the value but not being able to get display text from DataGridViewComboBoxColumn in for loop.</p>

<p>if it is possible then plzz help me with small code.</p>

<pre><code>private void button1_Click(object sender, EventArgs e)
    {
        for (int i = 0; i &lt;= dgList.Rows.Count - 1; i++)
        {
            DataGridViewComboBoxCell cell = dgList.Rows[i].Cells[0] as DataGridViewComboBoxCell;
            int index = cell == null || cell.Value == null ? -1 : cell.Items.IndexOf(cell.Value);
            string strVal = cell.Value.ToString();
        }
    }
</code></pre>

<p>thanks</p>
