Dear student,
In grassland ecosystem the number of producer at the first trophic level is always more than the herbivore at the second trophic level. At the third trophic level the number of carnivorous is lesser than the herbivore. So grassland ecosystem pyramid is always upright because the number is continuously decreasing at each trophic level.
Parasitic food chain pyramid is inverted because single plant which is at the first trophic level supports many herbivore (second trophic level) and each herbivore is a source of nutrition for many parasites (third trophic level). In this food chain the number at each trophic level increases making the pyramid inverted.
Regards