We present a theoretical analysis and experimental verification of a z-scanning double-grating interferometer for spatial coherence measurements in space-frequency and space-time domains. This interferometer permits the measurement of spatial coherence between an arbitrary pair of points along a one-dimensional line, and in favorable conditions, it has a high light efficiency compared to the classical Young's two-pinhole experiment. The scheme is applicable to both quasi-monochromatic and broadband sources that need not obey the Schell model. We first provide experimental results with several narrowband primary and secondary sources, and then apply the technique to broadband sources with discrete and continuous spectra. In the latter case, the complex degree of (time-domain) spatial coherence is retrieved from spectrally resolved measurements using the Friberg-Wolf theorem [Opt. Lett.20, 623 (1995)OPLEDP0146-959210.1364/OL.20.000623]. We compare all results to those obtained with Young's interferometer realized using a digital micromirror device.