Combo box to grid view(select only one time)
i want add one combo box value only one
5 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Murli Jadhav93 reputationPosted Jul 11, 2017, 2:02 AM EDT
for (int i = 0; i dataGridView1.Rows.Count; i++) { if (combobox.Text == dataGridView1.Rows[i].Cells[0].Value.ToString()) { MessageBox.Show("duplicate value"); return; } } dataGridView1.Rows.Add(textBox1.Text.Trim());You can add Your code to add buttonMurli Jadhav93 reputationPosted Jul 11, 2017, 1:37 AM EDT
Vishnu V79 reputationPosted Jul 11, 2017, 1:42 AM EDT
Vishnu V79 reputationPosted Jul 11, 2017, 1:46 AM EDT
Vishnu V79 reputationPosted Jul 11, 2017, 2:34 AM EDT
Murli Jadhav