I have a problem regarding in comparing 2 datagrid.
What my plan is match the 2 datagrid and update the EmployeeID.
I have 2 database.

here is my existing code.

selectquery as string = "SELECT EmployeeInitial, Firstname, Lastname from EmployeeRegistration"
da = New OleDbDataAdapter(selecquery,con)
ds = New DataSet

da.Fill(ds, "Employee Registration")
dgv1.DataSource = ds
dgv1.DataMember = "Employee Registration"

selectquery1 as string = "SELECT EmployeeID, Firstname, Lastname from EmployeeRegistration"
da1 = New OleDbDataAdapter(selecquery,concon)
ds1 = New DataSet

da1.Fill(ds1, "Employees")
dgv2.DataSource = ds1
dgv2.DataMember = "Employees"

For each row as DatagridViewRow in dgv1.rows
    For each row2 as DatagridViewRow in dgv2.rows

    'if firstname Of dgv1 = firstname of dgv2 and lastname of dgv1 = lastname of dgv2 then

        'i dont now how to compare the 2 datagrid by cell of Firstname of dgv1 and firstname of dgv2
        'and lastname of dgv1 and dgv2

        update database1

    'end if


Please help me. Thanks in advance.