In most places with district heating, the heat that goes to the heating system is waste heat which turbines of a nearby power plant cannot use. This applies to fuel-fired and nuclear power plants alike. (Keywords: Carnot cycle efficiency.)
So using electricity for heating would be just throwing free heat away. Heat distribution networks are of course not free though.
Electric heating would be an economical win if the electricity could be harvested by solar and wind generators, and stored. Storing solar heat directly is much trickier.