Well, since we're expanding the discussion to the 19th century, we might as well include King Ludwig I, who was still living in 1864, when his eldest son and successor (King Maximilian II, in whose favor he had abdicated the throne in 1848) died, and was succeeded in turn by his own elder son, the infamous "Mad" King Ludwig II.
I can think of only one other example of an abdicated king still living, when his grandson ascended the throne: that would have been Tsar Ferdinand of the Bulgarians, who died in 1948 -- after World War II and the abolition of the monarchy. The boy King Simeon had reigned briefly under a regency (1943-1946).
Augusta of Saxe-Weimar-Eisenach the wife of German Emperor Wilhelm I died in 1890 but did live to see her grandson become German Emperor Wilhelm II.
Queen Victoria of the United Kingdom also lived to see her grandson become German Emperor Wilhelm II and her grandson Ernst Ludwig become Grand Duke of Hesse and by Rhine. She also was alive when her grandson Charles Edward, Duke of Albany become the reigning Duke of Saxe-Coburg-Gotha.
Queen Isabella II of Spain abdicated in 1869 but lived to see her grandson become King Alfonso XIII of Spain. Her husband, Francisco de Asís, Duke of Cádiz, King Consort of Spain also lived to see his grandson become King of Spain.... although he may have not been the father of his wife's children.
Alfonso XIII 's maternal grandmother Archduchess Elisabeth Franziska of Austria was alive to see him become King of Spain.
Although Alfonso XIII of Spain became King at birth in 1886 all three of his grandparents listed above live into the 20th century.
The statistical odds of a royal living to see a grandchild sitting on a throne as a monarch (sovereign or consort) are increasingly rare; but this has happened a number of times in history -- even in the last century. So I was wondering about notable cases since the 20th:
To the best of my knowledge, Queen Mary of the UK (widow of King George V) is the only royal to witness the accession of a grandchild -- her granddaughter Elizabeth II, who became queen regnant in 1952.
King Christian IX of Denmark was still living, when in 1905 a grandson got elected as King Haakon VII of Norway. Another grandson became Czar Nicholas II of Russia, but that was in 1894, before the 20th century -- although it was close enough.
King Gustaf V of Sweden was still living, when in 1947 his granddaughter Ingrid became the queen of Denmark, as the consort of King Frederik IX. His own son and successor, King Gustaf VI Adolf, was likewise still living, when in 1972 Ingrid's own daughter ascended the Danish throne as Queen Margrethe II.
Both grandmothers of King Baudouin of the Belgians (Princess Ingeborg of Denmark and Duchess Elisabeth in Bavaria) were still living, when in 1951 he succeeded to the throne upon the abdication of his father. In fact, Queen Elisabeth was still living as of 1964, when her granddaughter Josephine-Charlotte (Baudouin's elder sister) became the consort of Grand Duke Jean of Luxembourg.
Princess Adelheid of Anhalt-Dessau, widow of Grand Duke Adolphe, was still living, when in 1912 her granddauhter succeeded as Grand Duchess Marie Adelaide of Luxembourg.
Princess Viktoria Luise of Prussia, Duchess of Brunswick, witnessed the accessions in 1964 of her grandson as King Constantine II of the Hellenes and in 1975 of her granddaughter as Queen Sofia of Spain.
Princess Marie of Saxe-Coburg and Gotha, consort of King Ferdinand of Romania, witnessed the accessions of two grandsons when they were minors -- King Michael of Romania in 1927 and King Peter II of Yugoslavia in 1934.
Prince Simeon of Saxe-Coburg and Gotha was also a minor, at the time of his accession in 1943 as Tsar of the Bulgarians: as of then, three of his four grandparents were still living.
Infanta Maria Teresa of Portugal (1855-1944) witnessed the accession of her grandson a Prince Franz Josef II of Liechtenstein, in 1938.
Both grandmothers of King Manuel II of Portugal (Princess Marie Isabelle of Orléans and Princess Maria Pia of Savoy) were still living, when in 1908 he unexpectedly succeeded to the throne upon the dual regicides of his father and older brother.
Are there additional examples? If not in the 20th century, then perhaps one could expand the discussion to the 19th ...