Sugar and table salt are both soluble in water due to the chemical structures of solute and solvent and the attractive interactions between the solute and solvent.
However, the covalent bonds of sugar determine that it remains an intact molecule when dissolve. You modeled this process in Modeling Solutions 1.
In contrast, the attractice force between the ions in ionic compounds is overcome when an ionic salt dissolves and the positive and negative ions separate from each other, each becoming surrounded by water.
Watch the animation below which models the solvation of an ionic compound in water: