R
R
rozxa332016-04-20 12:20:32
Visual Basic
rozxa33, 2016-04-20 12:20:32

How to check for the same values ​​in DataGridView1.Rows(i).Cells(2) with items in combobox?

Good afternoon. The problem is this, I write a schedule for receiving patients, it is necessary that the items in the combobox be enabled, temporarily, if they already exist in the table. Nothing works.
For i As Integer = 0 To DataGridView1.RowCount - 2
If DataGridView1.Rows(i).Cells(2). ToString= ComboBox4.SelectedItem Then
MsgBox("This time is already taken!", MsgBoxStyle.Information)// Instead of this message, it is necessary that the item became enabled
End If c26cecd5d4ff4d2987c79fa7c72b059c.PNG
Next

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Ananiev, 2016-04-20
@SaNNy32

It is impossible to make separate items as enabled in a combobox.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question