All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
It is not permissible for your grandfather to marry your wife after you die or after you divorce her, because Allaah considered the wife of the son as being eternally forbidden. Allaah Says (what means): {Prohibited to you [for marriage] are your mothers, your daughters, your sisters, your father’s sisters, your mother’s sisters, your brother’s daughters, your sister’s daughters, your [milk] mothers who nursed you, your sisters through nursing, your wives’ mothers, and your step daughters under your guardianship [born] of your wives unto whom you have gone in. But if you have not gone in unto them, there is no sin upon you. And [also prohibited are] the wives of your sons who are from your [own] loins, and that you take [in marriage] two sisters simultaneously, except for what has already occurred. Indeed, Allaah is ever Oft-Forgiving and Most Merciful.}[Quran 4:23].
The evidence from the verse is {And [also prohibited are] the wives of your sons}, and you are absolutely the son of your grandfather. The grandson takes the rank of a son and the grandfather takes the rank of a father. As regards the expression {…who are from your [own] loins}, this is to illustrate that an adopted child is not included in the above.
Allaah Knows best.