Yes you can do that as good virtue for your grandmother.
It was narrated from Sa’d bin ‘Ubadah that his mother died. He said:
“O Messenger of Allah, my mother has died; can I give charity on her behalf?” He said: “Yes.” He said: “What kind of charity is best?” He said: “Providing drinking water.” And that is the drinking-fountain of Sa’d in Al-Madinah.
Reference : Sunan an-Nasa’i 3666
In-book reference : Book 30, Hadith 56
English translation : Vol. 4, Book 30, Hadith 3696