You might want to follow up on that divorce reference that Gali has found on the National Archives site.
Divorce in that period was unusual (and very expensive!) and hard to obtain given the laws at that time.
Given the year showing on the link of 1896, the year after your grandmother was born, these papers may provide a clue that could help you link him to the events in Midlothian perhaps.
As Gali says, let us know how you get on

Monica