For rides of 1-2 hours, you don't need anything more than water. Put a granola bar in your bag just in case, but most of the time you won't touch it.
Once you go over 2 hours, start thinking about food.
I experimented with several different things like Gatorade, Powerade, Cytomax, and HEED. Of them all, I liked HEED the best. But then, a few years ago, I started doing my long rides with just water. I used electrolyte tablets to keep my electrolytes up (they're much better than what you'll get in any of the sports drinks), and I eat real food periodically throughout the ride.
Foods like salted almonds and potato chips are high in the electrolytes, as is a combination of beef jerky and orange juice. So include those on a 7 hour ride. And otherwise, just eat whatever you'd like to eat.
But to prevent the cramps, make sure you're drinking one 750 ml bottle every 1 to 1.5 hours ... and consuming electrolytes.