Hello,
Just wanted to improve the above solution.
Instead of using this check
if (ds.Tables[0].Rows[0][0].ToString()==ds1.Tables[0].Rows[0][0].ToString())
{}
use
string compare = ds1.Tables[0].Rows[0][0].ToString();
if(ds.Tables[0].DefaultView.RowFilter = "SNo ='"+compare+"'")
{}
Row filter will check the value in all the row, not only in row whoes index is provided (Rows[0][0])