I think you have to deal with this as a two-pronged problem.
First, yes, as everyone has said, your daughter needs to know that rudeness isn't tolerated. I would give her one "let's try that again in a friendly way" cue and then, she needs to have the line laid down in ways that both AV and Christy Lee have suggested. I think you need to address it with her in a calm way before your next visit with your dad, let her know what you have noticed, a simple explanation of why it is important to be polite and friendly, and what will happen ("I'll give you a chance to fix it, and if I see you don't want to, you'll be asked to leave the room until you can apologize.")
This way, she knows what's going to happen, which I think is reasonable and fair to her. Then, she can't blame you for being 'mean' because you aren't surprising her. She'll know you are holding her to your expectations.
The second is going to be harder. You will need to talk to your dad candidly before the next visit and explain your plan. "Dad, instead of getting into a conversation about her feelings, we need to keep things simple. So I'm giving her one chance to correct her behavior, and then she'll be sent to her room until she can apologize politely. I know you want to give her attention, and I love that you care about her enough to want to do stuff with her. I also want us to all be on the same page of giving her attention for her better behaviors, otherwise she's getting a lot of attention from you for being rude, not for being pleasant. So please let me step in and deal with it when the time comes."
You do want to give him a head's up that you aren't trying to correct *him* and his style of coaching/working through things, however, your daughter isn't getting what she really needs in the long term in regard to how to treat others, period.
I have to say, too, that I would never have been allowed to have treated my grandfather with disrespect- he would have ripped us up on side and down the other. Not that I approve of that extreme, but I don't approve of the permissive 'let's discuss it to death' extreme either. You, as the parent, correcting it in the moment will allow him to continue to be 'the nice guy' (which will protect their relationship) and will guide her to making better choices. Good luck!