I believe you have access to both dataset.
The code is simple as below:
CODE
DataSet ds = datagridview1.DataSource;
DataSet ds2 = datagridview2.DataSource;
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
for (int j = 0; j < ds.Tables[0].Columns.Count; j++)
{
if (ds.Tables[0].Rows[i][j].ToString() == ds2.Tables[0].Rows[i][j].ToString())
return true;
}
}
Be warn, need some more tweaking if you have a lot of records in the dataset.
Feb 21 2011, 04:10 PM
Quote
0.0155sec
0.48
6 queries
GZIP Disabled