Eating grass does not make any mammal produce milk. They only produce milk in order to nourish their offspring.
Dairy cows must be continually impregnated in order to keep a steady flow of milk. This is done by first collecting some semen from a bull, by literally jacking him off by hand, or sometimes with a special machine that stimulates his penis. Then, a farmer sticks his whole arm up the cow's butt while injecting the collected bull semen into her vagina. Can you say bestiality? This happens repeatedly throughout the cow's life, until she is too old to produce enough milk to be considered profitable enough to be kept alive (sometimes as young as 5 years old), at which point she is slaughtered and ground up into pet food. Oh yeah, and the baby cows that the milk should have gone to? They are dragged away shortly after birth in order to keep them from interfering by, you know, bonding with their mother. If female, the calf is raised to be a milk machine like her mother until her premature slaughter. If male, he is confined to a crate or cage for a few months (restricting his movement to keep his flesh soft) before having his throat slit and his body processed and sold as veal.
That's the dairy industry for ya. Lovely, huh?