There are no easy answers in this situation. Divorce naturally allows the child to develop the "divide and conquer" manipulative strategy that ALL children try, since usually divorced parents are not on the same team. It is certainly possible that her M. is feeding this in her as a way to get back at your husband. BUT it is not necessarily all her fault either. Its just the nature of trying to raise a child in two separate homes.
I'd sit down with your husband and figure out some house rules, things like being respectful and considerate towards both you and your husband. This would be an umbrella for the "demanding to go do things that cost money" category, but would include lots of other behaviors. It helps to have a general rule that specific bad behaviors fall under so the child doesn't think you just have a million rules that are hard to keep up with.
Don't feel the need to defend or explain why the rules are there with things like, there isn't enough money to do that. Kids don't get how this works, so keep referring to the household rules and ask her to obey them. You can say we're not going to do that today. If she refuses to obey you, then its rebellion, and you can deal with that as your household is comfortable with.
Lastly. Actively plan fun things (that are free) to do as a family. Keep her BUSY. I don't mean you have to take her out of the house all the time either. Just have things for her to do in the yard (collecting some leaves or sticks... Then have her glue them together or tie with string...whatever...). It doesn't mean you have to have hands on time with her all day long, but plan some things she can do independently and some that you can do with her. Keep your attitude upbeat and happy. If she breaks the rules and starts whining about being board, don't get angry, just get serious (firm but kind attitude) and refer back to your family rules and explain that this is what you're doing to day and you know that she'll enjoy it.
As far as getting her to WANT to spend time with you. That's tough. Don't feel you need to BUY her love (that might be what M. and grandparents are doing, and you can never win that game), quality time and a REAL INTEREST in what's going on in her world will be the best investment in her relationship with both of you. A kid in the long run would rather have some one on one time with you doing a craft then a new toy thrown at them every time they want attention. She will try to manipulate you saying that she doesn't want to spend time with you and all that. Just let it roll off of you. Keep welcoming her when she's with you and that's the best you can do for her.
Best wishes!