It sounds like your daughter was in an abusive relationship with how you describe the ex. Contact your local Wonens Aid (or in some areas it is now called IDAS) It doesn't matter that they are parted. She is still in what is called "the aftermath of domestic abuse"
Abuse is not just about physical violence. They will enable to emotionally support her and with court too. They also offer free counselling and support. Your daughter needs to feel she is no longer alone with this. It will also help her get support for your Grandson.
I don't know what we would have done without Women's Aid
My four year old grandson "doesn't want me"