【发布时间】:2017-07-04 06:11:27
【问题描述】:
如何在 msgbox 中显示值。在 datagrid 的第一列中,正在查找基于文本框的值,我希望显示来自第二列和 msgbox 中同一行的值。现在我只有“找到的项目”
Private Sub PictureBox12_Click(sender As Object, e As EventArgs) Handles PictureBox12.Click
Dim temp As Integer = 0
For i As Integer = 0 To List2DataGridView.RowCount - 1
For j As Integer = 0 To List2DataGridView.ColumnCount - 1
If List2DataGridView.Rows(i).Cells(j).Value.ToString = TextBox2.Text Then
MsgBox("Intem found")
temp = 1
End If
Next
Next
If temp = 0 Then
MsgBox("Item not found")
End If
End Sub
【问题讨论】:
标签: vb.net datagridview datagrid