Let R=⊕α∈ΓRα be an integral domain graded by a nontrivial torsionless grading monoid Γ. Among other things, we show that if Γ∩(−Γ)={0}, then every nonzero homogeneous ideal of R is invertible if and only if R0 is a field and R≅R0[X], where X is an indeterminate over R0, if and only if R is a Dedekind domain, if and only if R is a PID.