Another way to win your way into their lives is to be available to offer their parents respite time. If you are in the habit of being there for both parents if something goes wrong in the marriage you are not the enemy. You can still be part of the kids lives hopefully.
If there is ever a dispute and you have to seek a legal remedy all of this counts in your favor. Let us hope that time never comes but if it happens you have paid your dues and you deserve to be heard. The single thing to keep in mind during all of this is that it is ALL about the children. If you are willing to follow this advice you will stand a real good chance of always being a part of the grandchildren’s lives.