Why don't you want your grandma to have contact with your daughter's father. He is and always will be her father. It is extremely important for your daughter's emotional growth to feel that he's an accepted part of her family.
Why would you want to cause an emotional break from your grandmother for yourself? She is also a part of your family. You need her love too.
Find a way to heal your relationship. Start by accepting that your ex is still an important part of your family because he is the father of your child. That does not mean that you have to spend time with him but you still do have to have contact with him. You do have contact, don't you?
It also does not mean that you have to socialize with him. However, it's not fair that you stop others in your family from having a relationship with him. Look at this experience as an opportunity to expand your ability to accept life and the people who are in it as it is and they are. Learn ways of dealing with people without cutting them out of your life. I'm talking about your grandmother, not your ex.
Because your grandmother has contact with him does not mean that she believes or even accepts his attacks on your character. Talk with her about why she's in contact and how much. I suggest that she is now wiser and will be less apt to respond to his manipulations.
Your loving communication with her will help her be less vulnerable to manipulations. What has she done that causes you to believe that she will harm you because of something he has said or done? Open communication is the way to protect yourself. When you cut yourself off from her you are doing yourself a disservice. You don't know what she thinks and thus cannot know how to deal with the unexpected. And, most importantly, you've lost out on the love and support that she has to give you.
I suggest that her having contact could be in both yours and your daughter's best interest. She may be able to influence him in a good way. If not, and if you are able to communicate with you, she may be able to mediate in difficult situations. Never cut off communication because doing so puts you at a disadvantage.
If, you're not able on your own, to repair your relationship with your grandmother, I urge you to get counseling. As you said, it will be terribly painful for you when she dies and you no longer have the option of making things right with her.
I don't know what your grandmother has done and perhaps you cannot trust her. Because you've erased your other post, I have no idea what has gone on before. I suspect that you're feeling very hurt and trying to wipe out a whole bunch of stuff in an effort to reduce the pain.
I suggest you get counseling to help yourself to heal. The little bit I read here tells me that you're very unhappy and you deserve to have happiness again. Do not let the unreasonableness of your ex destroy your life.