Depending on the size of the fish there may always be a few that get stuck (in smaller trout the bones are thin and break off easily).
However, there is one way I was taught to cook it that is the best I've found and heats up the inside of the fish better making the bones a little easier to work out.
After cleaning the fish cover the outside and the inside in corn mill. This is going to make the trout cook a bit faster so keep you're eye on it. I usually cook it on a steel or cast iron pan in some light oil... usually not a fast burning oil (i.e. Olive Oil).
When its done cooking cut off the tail and head (you can cut the head off ahead of time if you don't plan on eating it) and then and lay the fish on its back and flatten it out with your hands so that you're looking at it's open belly.
Finally, grab the spine from the tail side of the fish and gently lift.
That's the best method I've found over all my years of cooking. There can still be a few small bones that are left in. Oh yeah, and if its a small one trout (6-10 inches) that tail can make a yummy snack... I call it trout bacon :P