When ionic compound is in solid state, the ions in the lattice are only able to vibrate about their fixed positions. Hence ions are not mobile. However when compound is molten (liquid) or in aqueous state, ions are mobile and can conduct electricity.