If I turn invisible and grapple a foe, does he still have disadvantage to hit me because I am invisible or does he now know where I am?
Yes, the attack is still at disadvantage
Percival already pointed out the rules pertinent to that, on page 194 of the PHB:
When you attack a target that you can't see, you have disadvantage on the attack roll. This is true whether you're guessing the target's location or you're targeting a creature you can hear but not see.
A few reasons why this is the case:
You know you're grappled, but the exact location of the creature's body parts is unknown. This is easy to see for strange, tentacled creatures, for example, but a grapple can be as simple as a person holding your shirt. Yes, their hand is on your shirt, but are they reaching from the right or the left? You know where they are, but a swing of your sword might still miss entirely.
Attacks aren't JUST about hitting. Your attack roll doesn't just say whether or not you can connect your metal stick to an opponent, it's whether you can damage the opponent. Sure, you might know they're in front of you, but if you bring that sword down it might connect on the thickest part of their armor. No pain, no damage. Or you might assume they're at the full extent of their reach and swing long, but they're almost pressed up against you and your arm hits their shoulder instead of your sword.
You're not the only one wiggling around. Even though it's your turn to act, combat is a set of concurrent events. As you swing left, they could be moving right. You are unable to adapt to their motion, even knowing they're close by.
They don't want to be hit. In full-vision combat, an expert swordsman (for example) can read an enemy's movements and adapt his strikes to avoid their attempts to defend. As they reach up the shield in their non-grapple hand, a master fighter would know to adjust his swing ever so slightly. You can't react to their attempts to defend themselves, which is part of what AC and Attack Rolls are representing.
These are just a few reason why an invisible person who is grappling you is still a more difficult target to hit.
The unseen attackers rule says:
When you attack a target that you can’t see, you have disadvantage on the attack roll. This is true whether you’re guessing the target’s location or you’re targeting a creature you can hear but not see.
There are no caveats for grapples or proximity, as long as you're invisible, and your invisibility comes from a source that is not dispelled when making the attack that grappled your opponent, the grapple-ee has disadvantage on attacks against you.
According to Jeremy Crawford, ability checks are not attack rolls. https://www.sageadvice.eu/2016/04/16/are-attack-rolls-ability-checks/
He cites this document:
(PAGE 5: Ability Checks)
The special attack text for grappling (and other special attacks) say specifically "by making a grapple check instead of an attack roll."
Rule it how you want, but the RAW says no.