I have to say I think it's wrong and unfair. You obviously think it's wrong because you'd be texting behind your boyfriend's back.
If you really want to, I think you should tell your boyfriend. Imagine how you'd feel if you found out your boyfriend was sneakily texting his ex for the 'gossip'.
I would never want to text my ex, wouldn't even know his number and my husband is my number 1 man/soul mate :) I find it a bit weird when people stay friendly with their ex, but that's just my opinion.
Sorry if I sound harsh!