The player is dis-abled as far as output goes when it is plugged into the computer via the Sansa connector cable. If you want to listen to it while charging, you’ll have to get a separate USB wall charger; then plug your Sansa cable (USB end) into this. DO NOT try and use a charger for I-pods or anything else unless it specifically says it is “Made for Sansa”!
Or you could get a dock/base station. This would also allow listening while charging. Griffin had a nice one on clearance a while ago, I don’t know if it’s still available. There are some threads here with the link to it.