Praise be to Allah.
Zakaat al-fitr is obligatory for all Muslims, males and females, old and young, as stated by the Prophet (peace and blessings of Allaah be upon him).
It is only required from the living who are present at the time when it becomes due.
The time when zakaat al-fitr becomes due is when the sun sets on the last day of Ramadaan, because the Prophet (peace and blessings of Allaah be upon him) called it sadaqat al-fitr, and fitr or breaking the fast of Ramadaan comes when the sun sets on the night of Eid (i.e., the night before Eid). It is a purification for the fasting person from any idle or obscene speech, and the fast ends when the sun sets.
If a person dies before the time it become obligatory, he does not have to pay this zakaah. If a person lives until the time when it becomes obligatory, then dies before paying it, then it should be paid on his behalf from his wealth because it is still a duty that he owes and becomes a debt that must be paid on his behalf.
See: al-Majmoo’, 6/84; al-Mugni, 2/358; al-Mawsoo’ah al-Fiqhiyyah, 23/341
Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) said:
If a person dies before the sun sets on the night before Eid, he does not have to pay zakaat al-fitr, because he died before it became obligatory. End quote.
Fiqh al-‘Ibaadaat, p. 211
In conclusion: The deceased person is responsible for this if he died after the time when it became obligatory, which is sunset on the night before Eid. In that case it must be paid on his behalf.
If he died before the time when it became obligatory – which appears to be the case in the question asked here – then this zakaah is not obligatory.
If your grandmother gave charity such as food, money, etc on his behalf, then it is charity given on his behalf and is not zakaat al-fitr.
It is proven in more than one hadeeth from the Prophet (peace and blessings of Allaah be upon him) that charity given on behalf of the dead benefits them and the reward reaches them.
See question no. 42384.
And Allaah knows best.