Grasshopper (or also known as Dragonfly pose) can also be described as "Side Dandasana". Besides the big hip opener that is required to keep the foot on your upper arm you must find the strength of your straight legs staff like position to give the pose the core needed to balance on your arms. Although this pose is an advanced asana there are many points along the way that you can work on to eventually build towards Grasshopper.
To practice towards this pose try ankle to knee and pigeon variations including some yin poses to open outer hip. This is needed in order to lift the foot higher then the elbow and keep it on the upper arm which is required in Grasshopper.
Another great practice is to use blocks under your hands in Dandasana and work to lift up your hips and pull back on your exhale. Making sure to keep your legs straight and engaged.
Other Arm balances will bring you closer to putting it all together. Try practicing Side Crow and keeping the legs together while reaching them straight out to the side very staff pose like and holding for a few breaths. This will help you when trying to coordinate the strength and core for the lift into your arms in Grasshopper.
To come up into Grasshopper:
Cross your right ankle over your left knee in a squat position.
Inhale your right arm up to lift the ribcage and extend the spine.
Exhale twist toward your right foot which is over to the left.
Work to place your right foot onto your right elbow. You can step onto a block or 2 to lift you higher helping to create the space needed to place foot on your upper arm.
Look at ground so your head is in line with the spine and gaze at the tip of your nose.
Reach your left leg out to the right to lift off the ground.