you can check this at rowdatabound :
protected void grdMain_RowDataBound(object sender, GridViewRowEventArgs e)
{
TextBox textbox1= (TextBox)e.Row.FindControl("txtBox1");
TextBox textbox2= (TextBox)e.Row.FindControl("txtBox2");
if(txtbox1.Text=="")
{
}
else if(txtBox2.Text=="")
{
}
else
{
}
}
After check the row , you can insert into database.
Hope this will help you.
Don't forget to mark as answer if it helps. :)