That explains it, then. That's why I wasn't getting it. I assume you're referring to this one, that you posted on another thread:
[FONT="]Close-Quarter Defense- [/FONT][FONT="]You gain a +2 bonus on attack rolls for an Attack of Opportunity generated by any of the following actions: an opponent entering your hex, making an unarmed attack, starting a grapple, bull rushing you, sundering your weapon or armor, etc. If your opponent has a Feat that allows them to do one of the above actions without generating an Attack of Opportunity, you may still take an Attack of Opportunity with a –10 penalty to your attack roll (instead of a +2).
[/FONT]If that's the case, then yeah, you would be allowed to take an AoO, with a -10 penalty, and should that attack hit, then the grapple attempt would be stopped, at least that is my reading of it.
This said, I'd check with your GM on his interpretation of it, specially since it's a feat from Dragon Magazine.
Edit: a small caveat: Improved Grab is an ability, not a Feat, so, if your DM enforces strict RAW, you would not get an AoO against it. My personal ruling would be that it applies against any of the two.