本文介绍了循环通过两个数据网格视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
i有两个数据网格视图,在第一个数据网格视图中我有3列
ID收到的主题
和第二个数据网格视图8列
ID主题收到日期用户等等
i希望用第二个数据网格视图的主题检查第一个数据网格视图中的主题行,并在标记列中说匹配或不匹配在第二个数据网格视图中。
有人请帮我这个双循环
什么我试过了:
Hello,
i have two data grid views and in the first data grid view i have 3 column
ID SUBJECT RECEIVED
and second data grid view 8 columns
ID subject received date user etc
i want to check the subject line in the first data grid view with second data grid view's subject and say "matching" or " not matching in the "mark" column in second data grid view.
someone please help me with this double loop
What I have tried:
'Dim rowindex As String
'Dim found As Boolean = False
''
'Dim i As Integer = 1
'For Each row As DataGridViewRow In LiveinboxDataGridView.Rows
' For Each rowww As DataGridViewRow In ElapsedDataGridView.Rows
' Dim str As String
' str = TextBox1.Text
' Dim xxx As String = rowww.Cells.Item(10).Value
' MsgBox(xxx)
' MsgBox(row.Cells.Item(7).Value)
' If row.Cells.Item(7).Value = xxx Then
' ' rowindex = row.Index.ToString()
' found = True
' ' Dim actie As String = rowww.Cells("Received").Value.ToString()
' MsgBox("Found")
' ' Exit For
' 'Exit For
' End If
' Next
'Next
'If Not found Then
' MsgBox("Item not found")
'End If
推荐答案
这篇关于循环通过两个数据网格视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!