The president cancelled his campaign event in light of the tragedy.