Optical-domain transient grating (TG) spectroscopy is the ideal tool to investigate transport phenomena in gases, liquids and solids, but it is limited to typically micron-size grating periods. Extreme-Ultraviolet TG has represented a major leap forward to access the mesoscopic scales. Hard X-ray TGs open access in principle to the nanoscale. Hard X-ray TGs were recently generated using the Talbot effect and probed by optical pulses, but these hinder exploiting the advantages of the nanoscale gratings. Here, we present an all-X-ray TG study, in which few-femtosecond hard X-ray pulses are used both for excitation and probing. Our experiment was performed on an amorphous film of an FeGd alloy and on a thin silicon single crystal. The results show a manifestation of the TG induced by the X-ray pump and probe pulses in the form of Talbot carpets, as well as temporal evolution of the grating in crystalline silicon showing coherent optical phonons. Ultrafast all-X-ray TG spectroscopy has the potential to study fundamental excitations with femtosecond time resolution and nanometer spatial sensitivity.