Answer the question
In order to leave comments, you need to log in
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
Next
Answer the question
In order to leave comments, you need to log in
It is impossible to make separate items as enabled in a combobox.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question