Gate patterning on semiconductors is routinely used to electrostatically restrict electron movement into reduced dimensions. At cryogenic temperatures, where most studies are carried out, differential thermal contraction between the patterned gate and the semiconductor often lead to an appreciable strain modulation. The impact of such modulated strain to the conductive channel buried in a semiconductor has long been recognized, but measuring its magnitude and variation is rather challenging. Here we present a way to measure that modulation in a gate-defined GaAs-based one-dimensional channel by applying resistively-detected NMR (RDNMR) with in-situ electrons coupled to quadrupole nuclei. The detected strain magnitude, deduced from the quadrupole-split resonance, varies spatially on the order of $10^{-4}$, which is consistent with the predicted variation based on an elastic strain model. We estimate the initial lateral strain $epsilon_{xx}$ developed at the interface to be about $3.5 times 10^{-3}$.