By using a 2.92 fb−1 data sample taken at s=3.773 GeV with the BESIII detector operating at the BEPCII collider, we search for the radiative transitions ψ(3770)→γηc and γηc(2S) through the hadronic decays ηc(ηc(2S))→KS0K±π∓. No significant excess of signal events above background is observed. We set upper limits at a 90% confidence level for the product branching fractions to be B(ψ(3770)→γηc)×B(ηc→KS0K±π∓)<1.6×10−5 and B(ψ(3770)→γηc(2S))×B(ηc(2S)→KS0K±π∓)<5.6×10−6. Combining our result with world-average values of B(ηc(ηc(2S))→KS0K±π∓), we find the branching fractions B(ψ(3770)→γηc)<6.8×10−4 and B(ψ(3770)→γηc(2S))<2.0×10−3 at a 90% confidence level.