"Compare DatagridviewComboBox Value with TextBox Value in DataGridview using C#.net"
private void button1_Click(object sender, EventArgs e)
{
DataGridViewComboBoxColumn column1 = (DataGridViewComboBoxColumn)dataGridView1.Columns[0];
foreach (string str in column1.Items)
{
if (str == textBox1.Text)
{
MessageBox.Show("Already Exists");
break;
}
}
}
{
DataGridViewComboBoxColumn column1 = (DataGridViewComboBoxColumn)dataGridView1.Columns[0];
foreach (string str in column1.Items)
{
if (str == textBox1.Text)
{
MessageBox.Show("Already Exists");
break;
}
}
}