That happened with some of my rainbows once. He started off just not swimming properly then went to not being able to move his body except in quick bursts that propelled him every which way. Lost 3 rainbows over a period of about a month I think. That was about a year ago, and I only have one left. Poor guy. Trys to school with the danios. 
