It would be better if you validate this from the UI control itself instead of looping in datatable...
Or else you can try something like this
for (int i = 0; i < dt.Rows.Count; i++)
{
if (!ValidateMarks(dt.Rows[i]))
{
}
}
where ValidateMarks Method will look like
private bool ValidateMarks(System.Data.DataRow dRow)
{
if (dRow["Mark1 "] != null || dRow["Mark1 "] != DBNull.Value || dRow["Mark1 "].ToString().Trim() != "")
{
return true;
}
return true;
}