Re: DataTable Comparision
How are you identifying that rows are the same? Must they have all fields match? ...just an ID? ...some other field or fields?
Re: DataTable Comparision
Thank you for yr reply...
I have a common field - ID - in both DataTables but i dont know how to compare two rows of different DataTables
Re: DataTable Comparision
Presumably that column is the primary key. In that case you can do this:
C# Code:
DataRow row2;
foreach (DataRow row1 in table1)
{
row2 = table2.Rows.Find(row1("ID"));
if (row2 != null)
{
// A matching ID was found.
}
}
Re: DataTable Comparision
Try to bind 2 tables ID's in 2 comboboxe and then you can easily compare both the combobox.