How do ionic compounds conduct electricity in water?
Wow! Excellent question!
The short answer is that ions can only conduct electricity when they are able to move.
Ions in a crystal are locked in place. While one might imagine that electricity could flow from one ion to another, that would require some room on the ions, especially the anions, to accept the electrons in the first place. In general, the anions are already full up with electrons (having achieved an inert gas electronic configuration). So there is no room to inject electrons into the orbitals of the anions, so there is no way for the electrons to start their journey from one side of the ionic solid to the other.
Ionis in water are an entirely different matter! The cations generated at the anode can move to the cathode where they can pick up electrons, and that anions generated at the cathode can move freely through the solution to the anode where they drop off their electrons.