She's not "neglecting" you. She's branching out. If anything, it's a compliment to you: She feels safe and securely enough attached to you that she's ready to experience other people. This is a phase. It will pass. Repeat that to yourself whenever you feel sad.
Why is it happening? There are a few possibilities. Young children are little imitators. They glom on to one adult or another, often the same-sex parent. It can be a heady time for that parent: he or she can do no wrong, the child's mimicry can be flattering as heck or, alternately, annoying as heck, and the parent who is on the "out" can be terribly hurt, especially when the youngster says things like, "No mommy! Daddy! Want daddy!" Mostly this mimicry is the child's way to figure out, "What does it mean to be a girl/boy?" So it's possible that your daughter is currently using one of her grandparents as her source of adoration.
Another possibility: what's going on at home? Are you and your husband arguing? Is home a scary/frightening/unpredictable place to be? That could make the grandparents' home more appealing.
And yet another possibility: How much are you protesting? Children crave attention, even if it's negative attention. If you are protesting this attention to grandma & grandpa in any way, verbal, nonverbal, subtle, not so subtle -- just showing your vulnerability or unhappiness -- she could pick up on that and do it because it generates attention from you AND attention from the grandparents. Who cares if it's negative attention? If this describes you, stop commenting on the attention she's giving them. Pretend it doesn't bother you.
This last possibility is the least likely, it seems to me, just because she's so young. But I wouldn't rule it out.
The second reason above is potentially the most troubling. If you think that might be why this is happening, get yourself some professional help. Otherwise, relax as best you can. This is not a negative reflection on her relationship with you; in fact, it shows that she feels safe and secure enough to be able to branch out. That's a good thing. On the other hand, it could turn on a dime, too. Just because she's 2 1/2 and going to go in an out of all kinds of stages.
Be patient! And don't take it personally.
I answer a question from a reader every weekday. If you want help with
some aspect of child-rearing, just write to me here.