245(i ) is an ever changing area of court interpretation. The Board of Immigration Appeals decided in
Matter of Legaspi that an immigrant spouse cannot always grandfather under 245(i) and independently qualify for a green card if s/he is married to another immigrant who
does have 245(i) grandfathering protection. 245(i) allows immigrants who entered the US illegally and who were sponsored for an immigration benefit (IV or labor cert) by a relative or employer by the cut off date of April 30, 2001 to obtain their green card in the US despite the illegal entry. The general rule, without 245(i), is that an immigrant must enter legally to obtain a green card in the US. If the immigrant cannot prove legal entry, the immigrant would have to travel to the consulate abroad to interview for their green card. But 245(i) saves the immigrant from having to travel abroad, if you can prove you qualify. An immigrant is "grandfathered" under 245(i) if they were a beneficiary of a petition filed by that date or were the spouse or child of an immigrant who was the direct beneficiary of that petition filed by April 30, 2001.
The BIA in Legaspi drew the line for grandfathering and made it all that more confusing. Try to follow this one. In Legaspi, the immigrant's wife was the child listed in a petition filed for her father by his father (her grandfather). The immigrant wife's father was the main beneficiary of the petition filed by April 30, 2011. Yes, the immigrant's wife is grandfathered under the father's petition. But, since the immigrant's wife did not have a petition directly filed to benefit her by that cut off date, he could not use her grandfathering status (as the child of a 245(i) beneficiary) to qualify himself as a grandfathered alien because he married her and skip consular processing, the ten year bar, and who knows what else.
As you can read, 245(i) can be very fact specific and complicated. Even 10 years later, it's still being used to qualify family for green cards.