You can have a data table have two columns mapped to the two text boxes, adding values of two text boxes to it and then make it the datasource of your grid view .. something like this:
DataTable dt = new DataTable();
dt.Columns.Add("Column1_Name", typeof(string));
dt.Columns.Add("Column2_Name", typeof(string));
GridView1.DataSource = dt;
GridView1.DataBind();
and in the OnClick event of your "Add" button :
DataRow dr;
dr = dt.NewRow();
dr["Column1_Name"] = txtBox1.Text;
dr["Column2_Name"] = txtBox2.Text;
dt.Rows.Add(dr);
GridView.DataBind();
then you can loop the DataTable dt to check for duplication