Hi, I'd like to help you with your question.
Raising a strong willed child, as you know, is a challenge to say the least. It sounds like your granddaughter is very cared about by both you and her parents. But disciplining her is important. If she is allowed to grow up without restrictions on her behavior, a strong willed child's behavior can become a huge problem.
While it is not fun for you or your grandchild, restricting her fun time with you is ok to do. Your grandchild's parents realize that she sees her visits with you as fun and enjoys them. The idea of punishment is to take away those things that the child enjoys so they understand that there are consequences to the undesirable behavior. While it is not fun to be regulated to the category of "fun things", it is something your grandchild understands.
You could also talk with your grandchild's parents and try coordinating the rules so she gets the same rules at your home as she does at home. That may not be as fun and it may make your grandchild upset, but it would also help keep her with you and might make her behavior easier to deal with.
You could also try a reward system. If your granddaughter behaves for you and her parents for a certain number of days, she gets to pick an activity she enjoys (within limits). Make sure the rules are very clear and remind her as often as you feel it is needed. Use a reward chart to help her understand (you can find them at most learning toy stores or Amazon.com might have one).
You and her parents can also learn more about raising strong willed children, if you have not already. Here are some resources to help:
Setting Limits with Your Strong-Willed Child : Eliminating Conflict by Establishing Clear, Firm, and Respectful Boundaries by Robert J. Mac Kenzie
Parenting the Strong-Willed Child: The Clinically Proven Five-Week Program for Parents of Two- to Six-Year-Olds [Revised and Updated Edition] by Ph.D.,Rex Forehand and Ph.D.,XXXXX XXXXX
You Can't Make Me (But I Can Be Persuaded): Strategies for Bringing Out the Best in Your Strong-Willed Child by Cynthia Ulrich Tobias
You can find these books on Amazon.com or your local library may have them for you.
The good news is that your granddaughter will probably become a very focused and goal oriented adult. Most strong willed children do very well in life and are well adjusted adults.
I hope this has helped you,